本文整理汇总了Java中net.minecraft.network.PacketBuffer.readBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.readBoolean方法的具体用法?Java PacketBuffer.readBoolean怎么用?Java PacketBuffer.readBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.readBoolean方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void fromBytes(ByteBuf buf) {
PacketBuffer buffer = new PacketBuffer(buf);
int x = buffer.readVarInt();
int y = buffer.readVarInt();
int z = buffer.readVarInt();
BlockPos pos = new BlockPos(x, y, z);
int contentLength = buffer.readVarInt();
String content = buffer.readString(contentLength);
int languageId = buffer.readByte();
boolean parsing = buffer.readBoolean();
ScriptLanguage language = ScriptLanguage.values()[languageId];
setContent(content);
setLanguage(language);
setPos(pos);
setParsing(parsing);
}
示例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.chunkX = buf.readInt();
this.chunkZ = buf.readInt();
this.loadChunk = buf.readBoolean();
this.availableSections = buf.readVarIntFromBuffer();
int i = buf.readVarIntFromBuffer();
if (i > 2097152)
{
throw new RuntimeException("Chunk Packet trying to allocate too much memory on read.");
}
else
{
this.buffer = new byte[i];
buf.readBytes(this.buffer);
int j = buf.readVarIntFromBuffer();
this.tileEntityTags = Lists.<NBTTagCompound>newArrayList();
for (int k = 0; k < j; ++k)
{
this.tileEntityTags.add(buf.readNBTTagCompoundFromBuffer());
}
}
}
示例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.lang = buf.readStringFromBuffer(7);
this.view = buf.readByte();
this.chatVisibility = (EntityPlayer.EnumChatVisibility)buf.readEnumValue(EntityPlayer.EnumChatVisibility.class);
this.enableColors = buf.readBoolean();
this.modelPartFlags = buf.readUnsignedByte();
this.mainHand = (EnumHandSide)buf.readEnumValue(EnumHandSide.class);
}
示例4: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer buf) throws IOException
{
super.readPacketData(buf);
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.onGround = buf.readBoolean();
}
示例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.message = buf.readStringFromBuffer(32767);
boolean flag = buf.readBoolean();
if (flag)
{
this.targetBlock = buf.readBlockPos();
}
}
示例6: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void readPacketData(PacketBuffer buf) throws IOException
{
super.readPacketData(buf);
this.posX = buf.readByte();
this.posY = buf.readByte();
this.posZ = buf.readByte();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.onGround = buf.readBoolean();
}
示例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.particleType = EnumParticleTypes.getParticleFromId(buf.readInt());
if (this.particleType == null)
{
this.particleType = EnumParticleTypes.BARRIER;
}
this.longDistance = buf.readBoolean();
this.xCoord = buf.readFloat();
this.yCoord = buf.readFloat();
this.zCoord = buf.readFloat();
this.xOffset = buf.readFloat();
this.yOffset = buf.readFloat();
this.zOffset = buf.readFloat();
this.particleSpeed = buf.readFloat();
this.particleCount = buf.readInt();
int i = this.particleType.getArgumentCount();
this.particleArguments = new int[i];
for (int j = 0; j < i; ++j)
{
this.particleArguments[j] = buf.readVarIntFromBuffer();
}
}
示例8: createFromBuffer
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public static PathPoint createFromBuffer(PacketBuffer buf)
{
PathPoint pathpoint = new PathPoint(buf.readInt(), buf.readInt(), buf.readInt());
pathpoint.distanceFromOrigin = buf.readFloat();
pathpoint.cost = buf.readFloat();
pathpoint.costMalus = buf.readFloat();
pathpoint.visited = buf.readBoolean();
pathpoint.nodeType = PathNodeType.values()[buf.readInt()];
pathpoint.distanceToTarget = buf.readFloat();
return pathpoint;
}
示例9: readPacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public void readPacketData(PacketBuffer buf) throws IOException
{
super.readPacketData(buf);
this.posX = buf.readByte();
this.posY = buf.readByte();
this.posZ = buf.readByte();
this.onGround = buf.readBoolean();
}
示例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.posX = buf.readDouble();
this.posY = buf.readDouble();
this.posZ = buf.readDouble();
this.yaw = buf.readByte();
this.pitch = buf.readByte();
this.onGround = buf.readBoolean();
}
示例11: readFromBuf
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
public static MerchantRecipeList readFromBuf(PacketBuffer buffer) throws IOException
{
MerchantRecipeList merchantrecipelist = new MerchantRecipeList();
int i = buffer.readByte() & 255;
for (int j = 0; j < i; ++j)
{
ItemStack itemstack = buffer.readItemStackFromBuffer();
ItemStack itemstack1 = buffer.readItemStackFromBuffer();
ItemStack itemstack2 = null;
if (buffer.readBoolean())
{
itemstack2 = buffer.readItemStackFromBuffer();
}
boolean flag = buffer.readBoolean();
int k = buffer.readInt();
int l = buffer.readInt();
MerchantRecipe merchantrecipe = new MerchantRecipe(itemstack, itemstack2, itemstack1, k, l);
if (flag)
{
merchantrecipe.compensateToolUses();
}
merchantrecipelist.add(merchantrecipe);
}
return merchantrecipelist;
}
示例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.lang = buf.readStringFromBuffer(7);
this.view = buf.readByte();
this.chatVisibility = EntityPlayer.EnumChatVisibility.getEnumChatVisibility(buf.readByte());
this.enableColors = buf.readBoolean();
this.modelPartFlags = buf.readUnsignedByte();
}
示例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.windowId = buf.readUnsignedByte();
this.actionNumber = buf.readShort();
this.accepted = buf.readBoolean();
}
示例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.left = buf.readBoolean();
this.right = buf.readBoolean();
}