コード例 #1
0
 /** Writes a tile entity to NBT. */
 @Override
 public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
   par1NBTTagCompound.setInteger("QEnergyItemBuffer", this.QEnergyItemBuffer);
   par1NBTTagCompound.setInteger("LastItemValue", this.lastItemValue);
   TileUtil.saveInventory(par1NBTTagCompound, this.inventory);
   super.writeToNBT(par1NBTTagCompound);
 }
コード例 #2
0
 @Override
 public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
   super.readFromNBT(par1NBTTagCompound);
   TileUtil.readInventory(par1NBTTagCompound, this.inventory);
   this.QEnergyItemBuffer = par1NBTTagCompound.getInteger("QEnergyItemBuffer");
   this.lastItemValue = par1NBTTagCompound.getInteger("LastItemValue");
   updateNextTick = true;
 }
コード例 #3
0
 @Override
 public ItemStack decrStackSize(int i, int j) {
   return TileUtil.decrStackSize(i, j, inventory);
 }