use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileCircuitDatabase method writeToNBT.
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
if (copyInventory.getStackInSlot(0) != null) {
NBTTagCompound stackTag = new NBTTagCompound();
copyInventory.getStackInSlot(0).writeToNBT(stackTag);
tag.setTag("copyTemplateStack", stackTag);
}
if (copyInventory.getStackInSlot(1) != null) {
NBTTagCompound stackTag = new NBTTagCompound();
copyInventory.getStackInSlot(1).writeToNBT(stackTag);
tag.setTag("copyOutputStack", stackTag);
}
tag.setInteger("curUploadProgress", curUploadProgress);
tag.setInteger("curCopyProgress", curCopyProgress);
tag.setByte("selectedShareOption", (byte) selectedShareOption);
}
use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileKinectGenerator 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 < 1; 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 TileKinectGenerator method writeToNBT.
/**
* This function gets called whenever the world/chunk is saved
*/
@Override
public void writeToNBT(NBTTagCompound tCompound) {
super.writeToNBT(tCompound);
for (int i = 0; i < 1; i++) {
if (allInventories[i] != null) {
NBTTagCompound tc = new NBTTagCompound();
allInventories[i].writeToNBT(tc);
tCompound.setTag("inventory" + i, tc);
}
}
}
use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileManager method writeToNBT.
/**
* This function gets called whenever the world/chunk is saved
*/
@Override
public void writeToNBT(NBTTagCompound tCompound) {
super.writeToNBT(tCompound);
for (int i = 0; i < 24; i++) {
if (inventory[i] != null) {
NBTTagCompound tc = new NBTTagCompound();
inventory[i].writeToNBT(tc);
tCompound.setTag("inventory" + i, tc);
}
}
tCompound.setByte("filterColor", (byte) filterColor.ordinal());
tCompound.setByte("mode", (byte) mode);
tCompound.setByte("priority", (byte) priority);
tCompound.setByte("fuzzySetting", (byte) fuzzySetting);
}
use of net.minecraft.nbt.NBTTagCompound in project BluePower by Qmunity.
the class TileAutoProjectTable method writeToNBT.
@Override
public void writeToNBT(NBTTagCompound tag) {
super.writeToNBT(tag);
if (craftBuffer != null) {
NBTTagCompound bufferTag = new NBTTagCompound();
craftBuffer.writeToNBT(bufferTag);
tag.setTag("craftBuffer", bufferTag);
}
}
Aggregations