Industrial Foregoing

Industrial Foregoing

95M Downloads

[1.16] Aquaculture 2 Minnow causes NullPointerException in Mycelial Culinary Generator

orangelynx opened this issue ยท 1 comments

commented

Problem: Piping a minnow into Industrial Forgegoing's Mycelial Culinary Generator causes a Server-Side Nullpointer Exception in

return Pair.of(food.getHealing() * 160, (int) (food.getSaturation() * 80));
.

Could not be reproduced in Singleplayer, where the item is not accepted by the generator at all.

What's clear is that the minnow appears to be tagged as "food", thus bypassing the filter here:

return ForgeRegistries.ITEMS.getValues().stream().filter(Item::isFood).map(ItemStack::new).map(item -> new MycelialGeneratorRecipe(Collections.singletonList(Collections.singletonList(Ingredient.fromStacks(item))), new ArrayList<>(), calculate(item).getLeft(), calculate(item).getRight())).collect(Collectors.toList());

But since it cannot be eaten, it has no healing and saturation values, causing the exception.

Proposed solution: Check proper registration / tagging of the Minnow or add NullPointerException to Industrial Foregoing.

I'm going to crosspost this in https://github.com/InnovativeOnlineIndustries/Industrial-Foregoing since it's maybe not clear on which side this should be fixed.

Environment: Valhelsia 3.4.9 Modpack, 1.16.5
Industrial Forgegoing v3.2.14.7-16
Aquaculture 2.1.21