本文整理汇总了Java中codechicken.lib.data.MCDataOutput.writeNBTTagCompound方法的典型用法代码示例。如果您正苦于以下问题:Java MCDataOutput.writeNBTTagCompound方法的具体用法?Java MCDataOutput.writeNBTTagCompound怎么用?Java MCDataOutput.writeNBTTagCompound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.lib.data.MCDataOutput
的用法示例。
在下文中一共展示了MCDataOutput.writeNBTTagCompound方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeDesc
import codechicken.lib.data.MCDataOutput; //导入方法依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
super.writeDesc(packet);
packet.writeInt(facePart.getFace());
packet.writeInt(facePart.getRotation());
for (int i = 0; i < 4; i++) {
RedstoneConnection c = ((BPPartFace) getPart()).getConnection(FaceDirection.getDirection(i));
if (c != null) {
packet.writeNBTTagCompound(c.getNBTTag());
} else {
NBTTagCompound t = new NBTTagCompound();
t.setBoolean("___error", true);
packet.writeNBTTagCompound(t);
}
}
}
示例2: writeDesc
import codechicken.lib.data.MCDataOutput; //导入方法依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
super.writeDesc(packet);
packet.writeString(getPart().getType());
NBTTagCompound tag = new NBTTagCompound();
getPart().save(tag);
packet.writeNBTTagCompound(tag);
}
示例3: writeDesc
import codechicken.lib.data.MCDataOutput; //导入方法依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet){
for(int i = 0; i < 6; i++) {
packet.writeBoolean(tube.sidesConnected[i]);
}
NBTTagCompound tag = new NBTTagCompound();
tube.writeToNBT(tag);
packet.writeNBTTagCompound(tag);
}
示例4: writeToPacket
import codechicken.lib.data.MCDataOutput; //导入方法依赖的package包/类
public void writeToPacket(MCDataOutput packet) {
packet.writeNBTTagCompound(write_internal(new NBTTagCompound()));
}
示例5: writeDesc
import codechicken.lib.data.MCDataOutput; //导入方法依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet)
{
S35PacketUpdateTileEntity p = (S35PacketUpdateTileEntity) relocator.getDescriptionPacket();
packet.writeNBTTagCompound(p.field_148860_e);
}