use of net.minecraft.nbt.NBTTagCompound 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.NBTTagCompound 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.NBTTagCompound in project BluePower by Qmunity.
the class TileAlloyFurnace method readFromNBT.
/*************** BASIC TE FUNCTIONS **************/
/**
* This function gets called whenever the world/chunk loads
*/
@Override
public void readFromNBT(NBTTagCompound tCompound) {
super.readFromNBT(tCompound);
for (int i = 0; i < 9; i++) {
NBTTagCompound tc = tCompound.getCompoundTag("inventory" + i);
inventory[i] = ItemStack.loadItemStackFromNBT(tc);
}
fuelInventory = ItemStack.loadItemStackFromNBT(tCompound.getCompoundTag("fuelInventory"));
outputInventory = ItemStack.loadItemStackFromNBT(tCompound.getCompoundTag("outputInventory"));
}
use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileBuffer method readFromNBT.
/**
* This function gets called whenever the world/chunk loads
*/
@Override
public void readFromNBT(NBTTagCompound tCompound) {
super.readFromNBT(tCompound);
for (int i = 0; i < 20; i++) {
NBTTagCompound tc = tCompound.getCompoundTag("inventory" + i);
allInventories[i] = ItemStack.loadItemStackFromNBT(tc);
}
}
use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileDeployer method readFromNBT.
/**
* This function gets called whenever the world/chunk loads
*/
@Override
public void readFromNBT(NBTTagCompound tCompound) {
super.readFromNBT(tCompound);
for (int i = 0; i < 9; i++) {
NBTTagCompound tc = tCompound.getCompoundTag("inventory" + i);
inventory[i] = ItemStack.loadItemStackFromNBT(tc);
}
}
Aggregations