mojira.dev
MC-80938

Non-default BurnTime, CookTime and CookTimeTotal values of furnace can cause GUI to be displayed incorrectly

The bug

When setting a furnace to have a CookTime of 1s, a CookTimeTotal of 1s, any variable of BurnTime greater than 1, and any smeltable item in slot 0b, then its GUI texture extends further than it should over to the right.

/setblock ~ ~ ~ furnace{CookTimeTotal:1,BurnTime:999,CookTime:1,Items:[{id:oak_log,Count:1}]}

Code analysis

Based on 1.10 decompiled using MCP 9.30

The problem is that the method net.minecraft.client.gui.inventory.GuiFurnace.drawGuiContainerBackgroundLayer(float, int, int) does not test if the calculated values "make sense". Because of this it uses an invalid width for a non-default CookTime CookTimeTotal ratio. This affects the BurnTime as well, but there you would have to change textures/gui/container/furnace.png to see it because the maximum height you could achieve is not enough to have the fire texture be repeated.

Linked issues

Attachments

Comments 6

Uriel Salischiker

Cant reproduce in minecraft 1.8.6 or 1.8.3. Had to use a command block as the command is too large for chat, and the sintax was wrong. Please provide the exact command you used

Here is a correct command to reproduce the bug, it does NOT require any mod/ressource pack :

/setblock ~ ~ ~ furnace 0 replace {CookTimeTotal:1,BurnTime:999,CookTime:1,Items:[{id:log,Count:1}]}

New picture uploaded in Vanilla 1.8.6.

For embedding commands in comments / description, embed the fragment with {code} tags.

Thank you. Will keep in mind for future reference.

This issue was fixed after changes to container sprite locations/rendering behavior in Snapshot 23w32a.

As of Minecraft 1.20.1, the bugged behavior was still reproducible with the above command:

[media]

As of Snapshot 23w32a and in all subsequent releases, the texture appears normally when running the same command:

[media]

Evtema3

(Unassigned)

Confirmed

Platform

Low

UI

BurnTime, CookTime, CookTimeTotal, GUI, display, furnace

Minecraft 1.8.6, Minecraft 1.10.2, Minecraft 16w32b, Minecraft 16w36a, Minecraft 16w38a, ..., 21w06a, 21w07a, 21w11a, 1.17 Pre-release 2, 1.17 Pre-release 4

23w32a

Retrieved