本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeBlockPos方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeBlockPos方法的具体用法?Java PacketBuffer.writeBlockPos怎么用?Java PacketBuffer.writeBlockPos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.writeBlockPos方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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.writeBlockPos(this.blockPos);
for (int i = 0; i < 4; ++i)
{
buf.writeChatComponent(this.lines[i]);
}
}
示例2: writeTo
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void writeTo(ByteBuf buf)
{
PacketBuffer buffer = new PacketBuffer(buf);
buffer.writeBlockPos(wirelessPos);
buffer.writeBlockPos(masterPos);
}
示例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.writeBlockPos(this.blockPosition);
buf.writeByte(this.instrument);
buf.writeByte(this.pitch);
buf.writeVarIntToBuffer(Block.getIdFromBlock(this.block) & 4095);
}
示例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.writeVarIntToBuffer(this.breakerId);
buf.writeBlockPos(this.position);
buf.writeByte(this.progress);
}
示例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.writeBlockPos(this.position);
buf.writeByte(this.placedBlockDirection);
buf.writeItemStackToBuffer(this.stack);
buf.writeByte((int)(this.facingX * 16.0F));
buf.writeByte((int)(this.facingY * 16.0F));
buf.writeByte((int)(this.facingZ * 16.0F));
}
示例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.writeEnumValue(this.status);
buf.writeBlockPos(this.position);
buf.writeByte(this.facing.getIndex());
}
示例7: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeBlockPos(this.blockPos);
buf.writeByte((byte)this.metadata);
buf.writeNBTTagCompoundToBuffer(this.nbt);
}
示例8: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeBlockPos(this.pos);
for (int i = 0; i < 4; ++i)
{
IChatComponent ichatcomponent = this.lines[i];
String s = IChatComponent.Serializer.componentToJson(ichatcomponent);
buf.writeString(s);
}
}
示例9: 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.soundType);
buf.writeBlockPos(this.soundPos);
buf.writeInt(this.soundData);
buf.writeBoolean(this.serverWide);
}
示例10: 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.playerID);
buf.writeBlockPos(this.bedPos);
}
示例11: writePacketData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeBlockPos(this.blockPosition);
buf.writeVarIntToBuffer(Block.BLOCK_STATE_IDS.get(this.blockState));
}