本文整理汇总了Java中net.minecraft.network.PacketBuffer.writeCompoundTag方法的典型用法代码示例。如果您正苦于以下问题:Java PacketBuffer.writeCompoundTag方法的具体用法?Java PacketBuffer.writeCompoundTag怎么用?Java PacketBuffer.writeCompoundTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.PacketBuffer
的用法示例。
在下文中一共展示了PacketBuffer.writeCompoundTag方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf)
{
PacketBuffer pbuf = new PacketBuffer(buf);
pbuf.writeCompoundTag(notebookInfo);
}
示例2: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf)
{
PacketBuffer pbuf = new PacketBuffer(buf);
pbuf.writeInt(slot);
pbuf.writeCompoundTag(cap);
pbuf.writeItemStack(stack);
}
示例3: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {
PacketBuffer ibuf = new PacketBuffer(buf);
m_guiMsg.toBytes(ibuf);
ibuf.writeInt(m_blockId);
ibuf.writeCompoundTag(m_updateTag); // internally handles null
ibuf.writeCompoundTag(m_readTag); // internally handles null
ibuf.writeCompoundTag(m_remoteTag); // internally handles null
ibuf.writeInt(m_dimensionId);
}
示例4: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {
PacketBuffer beef = new PacketBuffer(buf);
try {
buf.writeInt(PacketHandler.HANDLERS.indexOf(handler));
beef.writeCompoundTag(data);
} catch(Exception e) {
Solar.LOG.error("[Packet] Failed to send packet");
e.printStackTrace();
}
}
示例5: writeSpawnData
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void writeSpawnData(ByteBuf buffer) {
if(!this.first) {
PacketBuffer buff = new PacketBuffer(buffer);
buffer.writeBoolean(this.player);
if (this.profile != null) {
buff.writeUniqueId(this.profile.getId());
buff.writeString(this.profile.getName());
buff.writeVarInt(this.profile.getProperties().size());
for (Property property : this.profile.getProperties().values())
{
buff.writeString(property.getName());
buff.writeString(property.getValue());
if (property.hasSignature())
{
buff.writeBoolean(true);
buff.writeString(property.getSignature());
}
else
{
buff.writeBoolean(false);
}
}
}
buff.writeCompoundTag(data);
buff.writeBoolean(useHand);
}
}
示例6: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(final ByteBuf buf) {
final PacketBuffer buffer = new PacketBuffer(buf);
buffer.writeCompoundTag(nbt);
}
示例7: toBytes
import net.minecraft.network.PacketBuffer; //导入方法依赖的package包/类
@Override
public void toBytes(ByteBuf buf) {
PacketBuffer buffer = new PacketBuffer(buf);
buffer.writeCompoundTag(this.tag);
}