use of net.minecraft.nbt.NBTTagList in project BluePower by Qmunity.
the class GateIntegratedCircuit method writeToNBT.
// NBT and update packets
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
NBTTagList l = new NBTTagList();
writeParts(l);
tag.setTag("parts", l);
}
use of net.minecraft.nbt.NBTTagList in project BluePower by Qmunity.
the class TubeLogic method writeToNBT.
public void writeToNBT(NBTTagCompound tag) {
NBTTagList tagList = new NBTTagList();
for (TubeStack stack : tubeStacks) {
NBTTagCompound stackTag = new NBTTagCompound();
stack.writeToNBT(stackTag);
tagList.appendTag(stackTag);
}
tag.setTag("tubeStacks", tagList);
tag.setInteger("roundRobinCounter", roundRobinCounter);
}
use of net.minecraft.nbt.NBTTagList in project BluePower by Qmunity.
the class GateIntegratedCircuit method readFromNBT.
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
NBTTagList l = tag.getTagList("parts", new NBTTagCompound().getId());
readParts(l);
}
use of net.minecraft.nbt.NBTTagList in project BluePower by Qmunity.
the class TileMachineBase method writeToNBT.
@Override
public void writeToNBT(NBTTagCompound compound) {
super.writeToNBT(compound);
NBTTagList nbttaglist = new NBTTagList();
for (TubeStack tubeStack : internalItemStackBuffer) {
if (tubeStack != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
tubeStack.writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
compound.setTag("ItemBuffer", nbttaglist);
}
use of net.minecraft.nbt.NBTTagList in project LogisticsPipes by RS485.
the class LogisticsSecurityTileEntity method requestList.
public void requestList(EntityPlayer player) {
NBTTagCompound tag = new NBTTagCompound();
NBTTagList list = new NBTTagList();
for (Integer i : excludedCC) {
list.appendTag(new NBTTagInt(i));
}
tag.setTag("list", list);
MainProxy.sendPacketToPlayer(PacketHandler.getPacket(SecurityStationCCIDs.class).setTag(tag).setPosX(xCoord).setPosY(yCoord).setPosZ(zCoord), player);
}
Aggregations