/** 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);
 }
 @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;
 }
 @Override
 public ItemStack decrStackSize(int i, int j) {
   return TileUtil.decrStackSize(i, j, inventory);
 }