Posted August 31, 201411 yr Ok, when I start cooking something in my custom furnace block, and I log out while there is still fuel. Next time I log in, the fuel resets to max, So its infinite power, and just to make you you understand. It is not duplicating the fuel item, the fuel bar just keeps going to max. I don't know which classes you would need to look at, so please let me know and I will post them. Thanks
August 31, 201411 yr Are you saving to NBT? Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
August 31, 201411 yr Author Are you saving to NBT? If this is what your talking about, then yes public void readFromNBT(NBTTagCompound p_145839_1_) { super.readFromNBT(p_145839_1_); NBTTagList nbttaglist = p_145839_1_.getTagList("Items", 10); this.frierItemStacks = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); byte b0 = nbttagcompound1.getByte("Slot"); if (b0 >= 0 && b0 < this.frierItemStacks.length) { this.frierItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1); } } this.frierBurnTime = p_145839_1_.getShort("BurnTime"); this.frierCookTime = p_145839_1_.getShort("CookTime"); this.currentItemBurnTime = getItemBurnTime(this.frierItemStacks[1]); if (p_145839_1_.hasKey("CustomName", ) { this.field_145958_o = p_145839_1_.getString("CustomName"); } } public void writeToNBT(NBTTagCompound p_145841_1_) { super.writeToNBT(p_145841_1_); p_145841_1_.setShort("BurnTime", (short)this.frierBurnTime); p_145841_1_.setShort("CookTime", (short)this.frierCookTime); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.frierItemStacks.length; ++i) { if (this.frierItemStacks[i] != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte)i); this.frierItemStacks[i].writeToNBT(nbttagcompound1); nbttaglist.appendTag(nbttagcompound1); } } p_145841_1_.setTag("Items", nbttaglist); if (this.hasCustomInventoryName()) { p_145841_1_.setString("CustomName", this.field_145958_o); } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.