mrh0 / createaddition

Create Crafts & Additions, Addon to the Create mod by the Create Team.
Other
84 stars 112 forks source link

Blaze Burners with Straws aren't auto using bioethanol held within them immediately after burning out #726

Closed TurnrDev closed 9 months ago

TurnrDev commented 9 months ago

Describe the bug We have a set of 9 blaze burners with straws, which are being fed bioethanol / biofuel via create mod pumps from an infinite source. After updating from 1.2.0 to 1.2.1, the burners now switch to not being superheated and then start being super heated again after a few minutes. The Burners are full (4000mB of fuel) the entire time, so we don't know why it takes them so long to start back up.

Video

To Reproduce In 1.19.2-1.2.0, create a Blaze Burner with Straw and feed it bioethanol with create mod pumps.

Additional context

TurnrDev commented 9 months ago

CC: @Tur87

TurnrDev commented 9 months ago

@skippyall Tagging you as I know you'd had your eyes in the code so might know the answer - do you have any idea what might be causing this? It seems the blaze burner with bioethanol is only running for 2 minutes, not 20, and then waits for a few minutes before starting back up.

TurnrDev commented 9 months ago

I have identified the source of this problem and have a branch with a fix. I will create a PR later after I get some solid playtime in to just enjoy the game. <3

skippyall commented 9 months ago

In the same moment that I found a fix

skippyall commented 9 months ago

I think that it is intended that the blaze burner only runs for 2 minutes because it consumes only 100mb instead of 1 bucket.

TurnrDev commented 9 months ago

Interested to hear what your fix was: Mine was to remove an if statement which set activeFuel to normal and set the time remaining to five minutes (here)

skippyall commented 9 months ago

I did it by moving the decrementing of the remainingBurnTime in tick after the call of burningTick

skippyall commented 9 months ago

That way burningTick doesn't cancel at the remainingBurnTime>=1 check when the bioethanol is about to run out

skippyall commented 9 months ago

But when thinking about it, none of these are really good. It would be better to make it so that superheating fuel is always applied if the blaze burner is just normally heated

TurnrDev commented 9 months ago

What is the intention behind this if statement, do you know?

if (activeFuel == FuelType.SPECIAL) {
  activeFuel = FuelType.NORMAL;
  remainingBurnTime = MAX_HEAT_CAPACITY / 2;
} else {
  activeFuel = FuelType.NONE;
};

It seems to be setting fuel type to normal after the use of the bioethanol. Is that intended for when all the bioethanol is used?

skippyall commented 9 months ago

I think so because that matches the behavior of blaze cakes

TurnrDev commented 9 months ago

I've just tested your fix and it seems to work, nice catch! I'll let you make the PR for that, and am happy to leave a lovely review :)