本文整理汇总了Java中net.minecraft.network.PacketBuffer.readByteArray方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.readByteArray方法的具体用法?Java PacketBuffer.readByteArray怎么用?Java PacketBuffer.readByteArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.readByteArray方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.mapId = buf.readVarIntFromBuffer();
this.mapScale = buf.readByte();
this.mapVisiblePlayersVec4b = new Vec4b[buf.readVarIntFromBuffer()];
for (int i = 0; i < this.mapVisiblePlayersVec4b.length; ++i)
{
short short1 = (short)buf.readByte();
this.mapVisiblePlayersVec4b[i] = new Vec4b((byte)(short1 >> 4 & 15), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
}
this.mapMaxX = buf.readUnsignedByte();
if (this.mapMaxX > 0)
{
this.mapMaxY = buf.readUnsignedByte();
this.mapMinX = buf.readUnsignedByte();
this.mapMinY = buf.readUnsignedByte();
this.mapDataBytes = buf.readByteArray();
}
}
示例2: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.mapId = buf.readVarIntFromBuffer();
this.mapScale = buf.readByte();
this.trackingPosition = buf.readBoolean();
this.icons = new Vec4b[buf.readVarIntFromBuffer()];
for (int i = 0; i < this.icons.length; ++i)
{
short short1 = (short)buf.readByte();
this.icons[i] = new Vec4b((byte)(short1 >> 4 & 15), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
}
this.columns = buf.readUnsignedByte();
if (this.columns > 0)
{
this.rows = buf.readUnsignedByte();
this.minX = buf.readUnsignedByte();
this.minZ = buf.readUnsignedByte();
this.mapDataBytes = buf.readByteArray();
}
}
示例3: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.mapId = buf.readVarIntFromBuffer();
this.mapScale = buf.readByte();
this.trackingPosition = buf.readBoolean();
this.icons = new MapDecoration[buf.readVarIntFromBuffer()];
for (int i = 0; i < this.icons.length; ++i)
{
short short1 = (short)buf.readByte();
this.icons[i] = new MapDecoration(MapDecoration.Type.func_191159_a((byte)(short1 >> 4 & 15)), buf.readByte(), buf.readByte(), (byte)(short1 & 15));
}
this.columns = buf.readUnsignedByte();
if (this.columns > 0)
{
this.rows = buf.readUnsignedByte();
this.minX = buf.readUnsignedByte();
this.minZ = buf.readUnsignedByte();
this.mapDataBytes = buf.readByteArray();
}
}
示例4: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.hashedServerId = buf.readStringFromBuffer(20);
this.publicKey = CryptManager.decodePublicKey(buf.readByteArray());
this.verifyToken = buf.readByteArray();
}
示例5: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.chunkX = buf.readInt();
this.chunkZ = buf.readInt();
this.field_149279_g = buf.readBoolean();
this.extractedData = new S21PacketChunkData.Extracted();
this.extractedData.dataSize = buf.readShort();
this.extractedData.data = buf.readByteArray();
}
示例6: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.secretKeyEncrypted = buf.readByteArray();
this.verifyTokenEncrypted = buf.readByteArray();
}