Apotheosis Affix "Enchanting" + Tetra Tools = Crash
NielsPilgaard opened this issue ยท 5 comments
Bug Report
- Relayed from EnigmaticaModpacks/Enigmatica6#2217
Observed Behaviour
Applying any Apotheosis Affix to any Tetra tool, then swaping a part of it to a different one (honing the item does not crash, and seems to work properly) in a Tetra Workbench will crash the game upon hovering mouse over item and upon holding item.
Crash log: <!--- If crash, otherwise remove this line --->
Expected Behaviour
crash-2021-05-18_18.28.59-client.txt
Minimal setup needed to reproduce
- Forge version: 1.16.5-36.1.16
- Tetra version: tetra-1.16.5-3.10.0
- Tetra configuration: Default
- Other mods: Apotheosis, Placebo
Steps to reproduce
https://user-images.githubusercontent.com/52931413/118727157-b9b79f00-b808-11eb-9a35-488e435b08f9.mp4
So that call there is assumed to be "safe" in the notion that an affix can only be applied to something where that method would return true anyway.
I'm not entirely clear on how this mod works, but are your tools capable of changing tool type during their lifespan? It's fine for me to null check that return, but I also want to understand what is going on here in the first place.
Specifically, for that particular issue linked in that video to occur - your shield would suddenly have to be returning false to isShield, which would make no sense here.
From what I can see this happens as apotheosis is attempting to add affixes to the item but is unable to categorize the item.
The NPE occurs when it attempts to access a field on the return value from the nullable method EquipmentType.getTypeFor. I'm not sure if I can do anything about that on my side, and I'm guessing that it might be an oversight that the return value is not checked which shadows might want to fix.
What do you think @Shadows-of-Fire? (sorry for pinging you out of nowhere)