Mojira Archive
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.