Create Crafts & Additions

Create Crafts & Additions

51M Downloads

[Fabric only] Liquid blaze burners use fuel at twice the expected rate

dhouck opened this issue · 1 comments

commented

Describe the bug
Liquid-fuel blaze burners decrement their time remaining twice per tick, so use fuel at twice the expected rate.

To Reproduce

  1. Place a blaze burner
  2. Give it a straw
  3. Give it a bucket of lava
  4. Wait 500 seconds (10,000 game ticks)
  5. Note that it has stopped burning.

Alternate steps 4 and 5: use Carpet mod to tick step and see that the burn time decreases by two each tick.

If you look at

if (remainingBurnTime > 0)
remainingBurnTime--;
if (remainingBurnTime > 0 && !isCreative)
remainingBurnTime--;
burningTick();
if (isCreative)
return;
you can see that it decrements the counter no matter what, and then again if not creative.

If you look at the equivalent section of the Forge code, you see

burningTick();
if (isCreative)
return;
if (remainingBurnTime > 0)
remainingBurnTime--;

there is only one decrement statement because the early-exit for creative (and the call to burningTick) is before the decrement.

Iʼm not sure if the Forge solution would work here; there are some differences in burningTick that mean it might run into issues based on whether itʼs before or after the decrement in the case where we are now out of fuel. But at the very least the first conditional should be removed.

Additional context

  • Mod version: 1.2.3
  • Fabric version: 0.15.7
  • Create version: 0.5.1f build 1335
commented

I changed the order to make liquid blaze burners refill instantly (see also #726). I'd maybe do this on forge too because this might happen again next time we merge forge into fabric.