public override void readFromNBT(NBTTagCompound nbttagcompound) { base.readFromNBT(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); chestContents = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { var nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i); int j = nbttagcompound1.getByte("Slot") & 0xff; if (j >= 0 && j < chestContents.Length) { chestContents[j] = new ItemStack(nbttagcompound1); } } }
public override void readFromNBT(NBTTagCompound nbttagcompound) { base.readFromNBT(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); chestContents = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { var nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i); int j = nbttagcompound1.getByte("Slot") & 0xff; if (j >= 0 && j < chestContents.Length) { chestContents[j] = new ItemStack(nbttagcompound1); } } }
public override void readFromNBT(NBTTagCompound nbttagcompound) { base.readFromNBT(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); furnaceItemStacks = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { var 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]); }
public override void readFromNBT(NBTTagCompound nbttagcompound) { base.readFromNBT(nbttagcompound); NBTTagList nbttaglist = nbttagcompound.getTagList("Items"); furnaceItemStacks = new ItemStack[getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); i++) { var 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]); }