
Breaks when other mods have strange food nutrition values
judiraal opened this issue ยท 2 comments
Issue description
Some mods (e.g. Butchery) introduce strange foods that have negative nutrition values. (That should probably not be allowed, but since they are out there and functioning not much to do about that.) This currently breaks TileEntityNutritionalLiquifier
in getRecipe
's call to new NutritionalLiquifierIRecipe
. Since the food nutrition is negative the guard does not catch it, but later on in FluidOptionalItemOutput
the fluid.isEmpty()
call returns true. Negative fluid values are treated as empty.
Probably change the guard in TileEntityNutritionalLiquifier.getRecipe()
to food.nutrition() <= 0
instead of food.nutrition() != 0
.
Steps to reproduce
Test with Butchery and EMI: the Mekanism EMI plugin crashes and only part of the recipes are visible in EMI (e.g. fissile fuel is missing).
Minecraft version
1.21.1 (Latest)
NeoForge version
21.1.95
Mekanism version
10.7.7 (Latest)
Other relevant versions
Butchery 2.9 - https://www.curseforge.com/minecraft/mc-mods/butchery
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response
yup, this was already done, just might not be released yet
#8296