Bewitchment (Legacy)

Bewitchment (Legacy)

9M Downloads

Distilery not correctly checking output space left

arthus-leroy opened this issue ยท 0 comments

commented

Expected Behavior

A recipe having multiple items as output should only begin when there is not enough space left

Actual Behavior

The recipe begin processing as soon as there is any space left (tested with Bottled Hellfire)

Steps to Reproduce

Fill the Distillery except for the last spot.
Put a recipe having multiple items as output.
Watch Minecraft crash when the recipe ends

Version of Minecraft, Bewitchment, Forge, Patchouli, and Baubles used

Minecraft 1.12.2
Bewitchment 0.21.10
Forge 14.23.5.2847
Patchouli 1.0-20
Baubles 1.5.2

Screenshots encouraged

https://imgur.com/a/McPgljN

Logs, in the event of a crash

https://pastebin.com/yKfVYBsA

Additional informations

It seems to be because of the way the isValid function (DistilleryRecipe.java#L28) is handled. It checks each output separately instead of checking the whole things, which is most probably why it starts as soon as there is any space left, even if it's only 1 slot. It would be wise to take inspiration from SpinningWheelRecipe.java's isValid function, which actually checks everything in one expression.
NOTE: The secondary outputs are lost upon crash, which is normal looking at DistilleryRecipe.java#38.

If this is a question, developer commentary, or a suggestion, ignore this template

NOTICE FOR TRANSLATIONS: Feuerwurm is untranslatable, and this is deliberate. It is derived from "fire" and "worm" in German, due to past names of said mob having issues with translations in some languages, mainly Romance languages. However, if your language does not use Latin characters, translate it into your equivalent of either "Fire Snake" or "Fire Worm." Yes, I'm aware Bearded Fireworms are referred to as such as in German. But you can expect those never in this mod.