本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeByteArray方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeByteArray方法的具体用法?Java PacketBuffer.writeByteArray怎么用?Java PacketBuffer.writeByteArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.writeByteArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.mapId);
buf.writeByte(this.mapScale);
buf.writeVarIntToBuffer(this.mapVisiblePlayersVec4b.length);
for (Vec4b vec4b : this.mapVisiblePlayersVec4b)
{
buf.writeByte((vec4b.func_176110_a() & 15) << 4 | vec4b.func_176111_d() & 15);
buf.writeByte(vec4b.func_176112_b());
buf.writeByte(vec4b.func_176113_c());
}
buf.writeByte(this.mapMaxX);
if (this.mapMaxX > 0)
{
buf.writeByte(this.mapMaxY);
buf.writeByte(this.mapMinX);
buf.writeByte(this.mapMinY);
buf.writeByteArray(this.mapDataBytes);
}
}
示例2: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.mapId);
buf.writeByte(this.mapScale);
buf.writeBoolean(this.trackingPosition);
buf.writeVarIntToBuffer(this.icons.length);
for (Vec4b vec4b : this.icons)
{
buf.writeByte((vec4b.getType() & 15) << 4 | vec4b.getRotation() & 15);
buf.writeByte(vec4b.getX());
buf.writeByte(vec4b.getY());
}
buf.writeByte(this.columns);
if (this.columns > 0)
{
buf.writeByte(this.rows);
buf.writeByte(this.minX);
buf.writeByte(this.minZ);
buf.writeByteArray(this.mapDataBytes);
}
}
示例3: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.mapId);
buf.writeByte(this.mapScale);
buf.writeBoolean(this.trackingPosition);
buf.writeVarIntToBuffer(this.icons.length);
for (MapDecoration mapdecoration : this.icons)
{
buf.writeByte((mapdecoration.getType() & 15) << 4 | mapdecoration.getRotation() & 15);
buf.writeByte(mapdecoration.getX());
buf.writeByte(mapdecoration.getY());
}
buf.writeByte(this.columns);
if (this.columns > 0)
{
buf.writeByte(this.rows);
buf.writeByte(this.minX);
buf.writeByte(this.minZ);
buf.writeByteArray(this.mapDataBytes);
}
}
示例4: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeString(this.hashedServerId);
buf.writeByteArray(this.publicKey.getEncoded());
buf.writeByteArray(this.verifyToken);
}
示例5: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeInt(this.chunkX);
buf.writeInt(this.chunkZ);
buf.writeBoolean(this.field_149279_g);
buf.writeShort((short)(this.extractedData.dataSize & 65535));
buf.writeByteArray(this.extractedData.data);
}
示例6: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeByteArray(this.secretKeyEncrypted);
buf.writeByteArray(this.verifyTokenEncrypted);
}