Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dhouck opened this issue Apr 23, 2024 · 1 comment
Open
Labels
bug Something isn't working fabric

Comments

@dhouck
Copy link

dhouck commented Apr 23, 2024

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
@dhouck dhouck added bug Something isn't working fabric labels Apr 23, 2024
dhouck added a commit to dhouck/createaddition that referenced this issue Apr 24, 2024
Fixes mrh0#782.  This is not quite equivalent to the Forge implementation,
because I didn't want to worry about that implementing off-by-one errors
(see the referenced issue), but does work with brief testing.
@skippyall
Copy link

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.

dhouck added a commit to dhouck/barry-minecraft-server-modpack that referenced this issue Apr 26, 2024
This is a workaround for mrh0/createaddition#782
and will be reverted on the next release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fabric
Projects
None yet
Development

No branches or pull requests

2 participants