public void readFromNBT(NBTTagCompound nbttagcompound) { super.readFromNBT(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); furnaceItemStacks = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i); byte byte0 = nbttagcompound1.getByte("Slot"); if (byte0 >= 0 && byte0 < furnaceItemStacks.length) { furnaceItemStacks[byte0] = new ItemStack(nbttagcompound1); } } furnaceBurnTime = nbttagcompound.getShort("BurnTime"); furnaceCookTime = nbttagcompound.getShort("CookTime"); currentItemBurnTime = getItemBurnTime(furnaceItemStacks[1]); }
/** Reads a tile entity from NBT. */ public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.combinerItemStacks = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3); byte var5 = var4.getByte("Slot"); if (var5 >= 0 && var5 < this.combinerItemStacks.length) { this.combinerItemStacks[var5] = ItemStack.loadItemStackFromNBT(var4); } } this.combinerBurnTime = par1NBTTagCompound.getShort("BurnTime"); this.combinerCookTime = par1NBTTagCompound.getShort("CookTime"); this.currentItemBurnTime = getItemBurnTime(this.combinerItemStacks[1]); }