public NBTTagCompound writeNBT(NBTTagCompound compound) {
compound.setTag("Pos", NBTUtil.createPosTag(pos));
compound.setInteger("SyncType", type.ordinal());
compound.setInteger("Length", values.length);
ByteBuf buf = Unpooled.buffer();
NBTTagList list = new NBTTagList();
for (int i = 0; i < types.length; i++) {
NBTTagCompound element = new NBTTagCompound();
element.setByte("Type", types[i]);
buf.clear();
PacketUpdateGui.writeField(buf, values[i], types[i]);
element.setByteArray("Value", Arrays.copyOf(buf.array(), buf.writerIndex()));
list.appendTag(element);
}
buf.release();
compound.setTag("Data", list);
compound.setTag("Extra", extraData);
return compound;
}
PacketDescription.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录