[MC-10025] Burn time indicator of a furnace not working correctly after reloading the world Created: 19/Feb/13  Updated: 22/Nov/24  Resolved: 22/Nov/24

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.7, Snapshot 13w07a, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 13w36a, Minecraft 13w36b, Minecraft 1.7.4, Minecraft 1.7.10, Minecraft 1.10.2, Minecraft 16w35a, Minecraft 16w36a, Minecraft 16w38a, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w09a, Minecraft 18w10d, Minecraft 18w20c, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w14a, Minecraft 1.14.3, 1.14.4, 19w39a, 1.15 Pre-release 6, 1.15.1, 20w07a, 1.16, 1.16.1, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05a, 21w05b, 21w06a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 4, 1.17, 1.17.1 Pre-release 1, 1.17.1, 21w37a, 21w41a, 1.18 Pre-release 7, 1.18 Pre-release 8, 1.19, 1.19.2, 1.19.3, 23w03a, 23w04a, 23w05a, 23w06a, 23w07a, 1.19.4 Pre-release 3, 1.19.4, 23w13a, 23w14a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 4, 1.20.1, 23w31a, 23w32a, 23w33a, 23w35a, 1.20.2 Pre-release 1, 1.20.2 Pre-release 2, 1.20.2, 23w40a, 23w41a, 23w42a, 23w44a, 1.20.4, 24w03b, 24w04a, 24w05a, 24w11a, 24w12a, 1.20.6, 1.21, 1.21.3
Fix Version/s: 1.21.4 Pre-Release 2

Type: Bug
Reporter: Dimitriye Danilovic Assignee: [Mojang] SHugoh
Resolution: Fixed Votes: 40
Labels: furnace, rendering, smelting

Attachments: PNG File 2016-09-19_14.59.18.png     PNG File 23w31a.png     Text File Snippet.txt    
Issue Links:
Duplicate
is duplicated by MC-9288 Leaving game when furnace is on cause... Resolved
is duplicated by MC-12954 furnance that dosent stop smealting Resolved
is duplicated by MC-16379 furnaces don't display fire level Resolved
is duplicated by MC-19821 furnace power entering and coming bac... Resolved
is duplicated by MC-21643 Furnaces with semi-infinite fuel! Resolved
is duplicated by MC-24413 Furnace Fire Meter Inaccuracy Resolved
is duplicated by MC-25812 Infinite Furnace with coal block when... Resolved
is duplicated by MC-27369 Lava Furnace Bug Resolved
is duplicated by MC-28309 Coal Block is an infinite source of f... Resolved
is duplicated by MC-28415 Forever Burning Furnace- Hopper use g... Resolved
is duplicated by MC-37534 A furnace can lose track of progress,... Resolved
is duplicated by MC-48292 furnace fuel level indicator not upda... Resolved
is duplicated by MC-52555 Lava Fuel in Furnace Resolved
is duplicated by MC-120834 Infinite fuel in Furnace Resolved
is duplicated by MC-129851 Furnace interface bug Resolved
is duplicated by MC-169324 Viewing a furnace during a server res... Resolved
is duplicated by MC-172513 Furnace fuel bug in snapshot 20w07a a... Resolved
is duplicated by MC-191271 Furnace Won't show how much fuel is L... Resolved
is duplicated by MC-193199 visual "Infinite" fuel glitch with lava Resolved
is duplicated by MC-194129 The furnace fuel indicator does not r... Resolved
is duplicated by MC-195242 Going in and out of the nether resets... Resolved
is duplicated by MC-199798 Furnace Smelting Rendering Animation ... Resolved
is duplicated by MC-201776 Blast furnace refill of fuel in nether Resolved
is duplicated by MC-205978 furnace visual bug after game crash Resolved
is duplicated by MC-229700 Infinite furnace Resolved
is duplicated by MC-242790 The progress bar of furnace displays ... Resolved
is duplicated by MC-252883 Furnace's fuel spent resets when you ... Resolved
is duplicated by MC-264677 Furnace GUI is sometimes displayed in... Resolved
is duplicated by MC-265797 Furnace doesn't store initial burn time. Resolved
is duplicated by MC-269927 Fuel indicator (fire symbol) in furna... Resolved
Relates
relates to MC-274088 Spawn chunks do not load most things ... Resolved
relates to MC-137146 Furnace fuel indicator incorrect on c... Open
relates to MC-26304 Brewing stands reset brew cycle when ... Resolved
relates to MC-80938 Non-default BurnTime, CookTime and Co... Resolved
relates to MC-264260 Furnace GUI is displayed incorrectly ... Resolved
CHK:
Confirmation Status: Confirmed
Category:
Networking
Mojang Priority: Normal
Area: Platform

 Description   

The bug

When you start a furnace burning and then swap out what's in the fuel slot and save and quit, the next time you load the burn time indicator will glitch. The reason for this is that the NBT file for furnaces does not store the max fuel burn time and instead dynamically gets it from the fuel slot, which may no longer contain the same item as was used to initially fuel the furnace. This can be seen in the code snippet attached.

To reproduce

  1. Start furnace burning with a fuel other than a stick.
  2. Allow the burn time to visibly decrease.
  3. Swap the fuel with something that burns shorter than the original fuel.
  4. Save and quit.
  5. Reload the save.
  6. Open the furnace.
  7. The burn time indicator will have increased.

With particularly large differences (lava bucket to stick), the progress bar may wrap around the top of the screen and display twice (see 2016-09-19_14.59.18.png).

Fix

Rather than attempting to guess the total burn time of the original item, it should be saved too:

TileEntityFurnace
    public void readFromNBT(NBTTagCompound compound)
    {
        super.readFromNBT(compound);
        this.furnaceItemStacks = NonNullList.<ItemStack>withSize(this.getSizeInventory(), ItemStack.EMPTY);
        ItemStackHelper.loadAllItems(compound, this.furnaceItemStacks);
        this.furnaceBurnTime = compound.getShort("BurnTime");
        this.cookTime = compound.getShort("CookTime");
        this.totalCookTime = compound.getShort("CookTimeTotal");
        //this.currentItemBurnTime = getItemBurnTime(this.furnaceItemStacks.get(1));
        this.currentItemBurnTime = compound.getShort("BurnTimeTotal"); // added

        if (compound.hasKey("CustomName", 8))
        {
            this.furnaceCustomName = compound.getString("CustomName");
        }
    }

    public NBTTagCompound writeToNBT(NBTTagCompound compound)
    {
        super.writeToNBT(compound);
        compound.setShort("BurnTime", (short)this.furnaceBurnTime);
        compound.setShort("CookTime", (short)this.cookTime);
        compound.setShort("CookTimeTotal", (short)this.totalCookTime);
        compound.setShort("BurnTimeTotal", (short)this.currentItemBurnTime); // added
        ItemStackHelper.saveAllItems(compound, this.furnaceItemStacks);

        if (this.hasCustomName())
        {
            compound.setString("CustomName", this.furnaceCustomName);
        }

        return compound;
    }


 Comments   
Comment by [Mod] j_p_smith [ 10/Aug/23 ]

The broken GUI is fixed in 23w32a, but the burn time indicator is still incorrect.

Comment by [Mod] Avoma [ 14/Sep/22 ]

Can confirm in 1.19.2.

Comment by Brevort [ 30/May/21 ]

Does this also occur when switching dimensions or unloading and reloading the chunks in ways other than reloading the world?

Never mind, that's MC-137146.

Comment by Sourrazz [ 07/Nov/20 ]

Confirmed for 1.16.4

Comment by pulpetti [ 17/Jul/20 ]

Can confirm for 20w29a

Comment by Iosiv Visokogorskiy [ 24/Jun/20 ]

Can confirm for 1.16.1

Comment by guenstig [ 16/Jul/19 ]

confirmed for 1.14.3, happens also with lava bucket without intentional switching out of fuel item since full bucket changes to empty bucket

Comment by Kraif [ 25/Aug/18 ]

Confirmed for 1.13.1.

Comment by A man [ 29/Jul/16 ]

Confirmed for 1.10.2

Also relating to MC-64354 (coal blocks not decreasing)

Comment by user-f2760 (Inactive) [ 17/Mar/16 ]

No response for over a year.

Comment by Galaxy_2Alex [ 25/Oct/14 ]

Is this still a concern in the current Minecraft version 1.8.1 Prerelease 3 / Launcher version 1.5.3 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Pierre Waldén [ 21/Jul/14 ]

I can confirm this on 1.7.10
It is just a visual glitch though, so there is no need to put this as a high priority really.

Comment by fienxjox [ 24/Jan/14 ]

Galaxy_2Alex - I don't see the 14w03b as released as of right this moment, just the tweet that it is coming "sometime today"

EDIT: and 3 minutes later, there it is....

Comment by YuzzzzuY [ 24/Jan/14 ]

I can confirm this for version 14w04a

Comment by Jasmine Li [ 08/Sep/13 ]

This still happens in 1.6.2, and the 1.7 snapshots.

Comment by Kumasasa [ 29/Jun/13 ]

Confirmed for 1.6.1 and block of coal

Comment by kbk [ 03/May/13 ]

Can confirm in 1.5.2 using lava buckets. Apparently, empty bucket or its removal is being treated as if you were swapping the fuel.

Comment by Carl Lystad [ 26/Feb/13 ]

The fuel source does not need to be swapped, either. Simply unloading the chunk and loading it again is enough to trigger the glitch.

I first noticed it when I used lava buckets to start a bunch of furnaces and went to the Nether to refill the buckets. When I came back, this glitch had appeared.

Comment by Tails [ 21/Feb/13 ]

Confirmed in 13w07a. Just a visuall glitch with the burn time indicator, the burning process is correctly finished after smelting the amount of items according to the fuel type.

Comment by Dean Baset [ 21/Feb/13 ]

Unable to reproduce. Please provide a step by step list on how to reproduce. ie:
1. do this
2. now this
3. and finally this

Generated at Sun Jan 12 12:23:01 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.