本文整理汇总了Java中net.minecraft.network.PacketBuffer.readShort方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.readShort方法的具体用法?Java PacketBuffer.readShort怎么用?Java PacketBuffer.readShort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.readShort方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.entityId = buf.readVarIntFromBuffer();
this.type = buf.readByte();
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.pitch = buf.readByte();
this.yaw = buf.readByte();
this.field_149020_k = buf.readInt();
if (this.field_149020_k > 0)
{
this.speedX = buf.readShort();
this.speedY = buf.readShort();
this.speedZ = buf.readShort();
}
}
示例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.entityId = buf.readVarIntFromBuffer();
this.type = buf.readByte() & 255;
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.headPitch = buf.readByte();
this.velocityX = buf.readShort();
this.velocityY = buf.readShort();
this.velocityZ = buf.readShort();
this.watcher = DataWatcher.readWatchedListFromPacketBuffer(buf);
}
示例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.entityId = buf.readVarIntFromBuffer();
this.uniqueId = buf.readUuid();
this.type = buf.readByte() & 255;
this.x = buf.readDouble();
this.y = buf.readDouble();
this.z = buf.readDouble();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.headPitch = buf.readByte();
this.velocityX = buf.readShort();
this.velocityY = buf.readShort();
this.velocityZ = buf.readShort();
this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
示例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.entityId = buf.readVarIntFromBuffer();
this.uniqueId = buf.readUuid();
this.type = buf.readVarIntFromBuffer();
this.x = buf.readDouble();
this.y = buf.readDouble();
this.z = buf.readDouble();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.headPitch = buf.readByte();
this.velocityX = buf.readShort();
this.velocityY = buf.readShort();
this.velocityZ = buf.readShort();
this.dataManagerEntries = EntityDataManager.readEntries(buf);
}
示例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.windowId = buf.readByte();
this.slot = buf.readShort();
this.item = buf.readItemStackFromBuffer();
}
示例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.windowId = buf.readUnsignedByte();
this.varIndex = buf.readShort();
this.varValue = buf.readShort();
}
示例7: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.windowId = buf.readUnsignedByte();
int i = buf.readShort();
this.itemStacks = new ItemStack[i];
for (int j = 0; j < i; ++j)
{
this.itemStacks[j] = buf.readItemStackFromBuffer();
}
}
示例8: 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();
}
示例9: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityID = buf.readVarIntFromBuffer();
this.motionX = buf.readShort();
this.motionY = buf.readShort();
this.motionZ = buf.readShort();
}
示例10: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityId = buf.readVarIntFromBuffer();
this.playerId = buf.readUuid();
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.currentItem = buf.readShort();
this.field_148958_j = DataWatcher.readWatchedListFromPacketBuffer(buf);
}
示例11: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void readPacketData(PacketBuffer buf) throws IOException
{
super.readPacketData(buf);
this.posX = buf.readShort();
this.posY = buf.readShort();
this.posZ = buf.readShort();
this.onGround = buf.readBoolean();
}
示例12: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.windowId = buf.readUnsignedByte();
this.property = buf.readShort();
this.value = buf.readShort();
}
示例13: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.chunkPos = new ChunkPos(buf.readInt(), buf.readInt());
this.changedBlocks = new SPacketMultiBlockChange.BlockUpdateData[buf.readVarIntFromBuffer()];
for (int i = 0; i < this.changedBlocks.length; ++i)
{
this.changedBlocks[i] = new SPacketMultiBlockChange.BlockUpdateData(buf.readShort(), (IBlockState)Block.BLOCK_STATE_IDS.getByValue(buf.readVarIntFromBuffer()));
}
}
示例14: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.windowId = buf.readByte();
this.slotId = buf.readShort();
this.usedButton = buf.readByte();
this.actionNumber = buf.readShort();
this.mode = buf.readByte();
this.clickedItem = buf.readItemStackFromBuffer();
}
示例15: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
this.slotId = buf.readShort();
this.stack = buf.readItemStackFromBuffer();
}