Recipes from Theurgy are not visible when IE and NotEnoughRecipeBooks are installed.
MuteTiefling opened this issue · 2 comments
Minecraft Version
1.19.2
Immersive Engineering Version
1.19.2-9.2.2-165
Expected Behavior
Recipes for Theurgy should show despite the inclusion of IE and NERB
Already reported to Theurgy and NotEnoughRecipeBook devs. Reporting to you as well in case you can offer any insight on what might be happening.
Actual Behavior
The recipes for Theurgy don't show if IE and NERB are both active. If either or both are disabled, the recipes for Theurgy show without issue.
Steps to reproduce
- Search the rods in JEI
- Check recipe
- No recipe shows
Minimal mods to reproduce:
- ImmersiveEngineering-1.19.2-9.2.2-165.jar
- jei-1.19.2-forge-11.6.0.1015.jar
- modonomicon-1.19.2-1.30.2.jar
- nerb-1.19.2-0.2.jar
- theurgy-1.19.2-1.3.3.jar
Debug Crash Log
https://gist.github.com/MuteTiefling/15b5cd2cd2d598afcd7e186c2bfde731
This is a very silly problem… I have not worked out the full details, but I'm pretty sure this is the rough cause:
Theurgy uses the initCapabilities
method on their divination rod item to also modify/initialize the item stack NBT. This is only relevant for SETTING_ALLOW_ATTUNING
since all other values are set in the recipes. IIRC this used to be mostly safe since capabilities were constructed on item stack construction, but Forge switched to lazily initializing them instead. So now the item stack changes the first time its capabilities are queried. Without IE that is "roughly never" for stacks in recipes and the JEI ingredient list. IE queries a capability when tooltips are generated, in particular when search trees for the creative menu, JEI's ingredient list and the vanilla recipe book are computed. With IE and working recipe books, this means that both the items in the ingredient list and those in recipes have their NBT initialized. With IE and non-working recipe book (i.e. with NERB), only those in the ingredient list are initialized. This is a problem since JEI determines which recipes correspond to an ingredient using subtype interpreters. The interpreter used for divining rods considers the initialized item (settingAllowAttuning=true
) and non-initialized (settingAllowAttuning=false
) items to be distinct, so recipe lookup breaks.
Overall I would say that this is on Theurgy to fix.
Thanks for researching! I'll look into how to mitigate that!
EDIT: Thanks again, fixed as per klikli-dev/theurgy#117 (comment)