Distilery not correctly checking output space left
arthus-leroy opened this issue ยท 0 comments
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
Logs, in the event of a crash
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.