[1.12.2] Crash with ToolBelt 1.9.0
Drunkender opened this issue ยท 6 comments
Upon dropping an item into the tool belt GUI the game freezes. This is with hotkey and holding the belt and opening the GUI with right click.
Without Astral Sorcery this does not occur.
Forge version : 14.23.5.2838
Toolbelt version : 1.9.0
Astral Sorcery version : 1.10.19
Getting same error when Trying to place a tool into belt that is in dedicated slot.
Hey @Drunkender, sorry that I didn't answer earlier, I didn't notice this report until @spocane replied!
Thanks to both of you for the report, I forgot to call one of the initialization methods from the mod, which means a certain object was null that shouldn't have been!
This doesn't happen with any other mod because the way astral sorcery does the check is not how it's supposed to be done, so Astral Sorcery causes the crash, but the error is primarily mine.
More details, for anyone who wants them:
See: https://github.com/HellFirePvP/AstralSorcery/blob/1.12.2/src/main/java/hellfirepvp/astralsorcery/common/enchantment/amulet/AmuletHolderCapability.java#L73
They are comparing the capability using equals
which is completely unnecessary, capability instances are unique, so using ==
is the way to go. The reason I still have to fix it on my end regardless, is that the parameter is NOT nullable, and the value I am passing into it is NOT meant to be null, but since it is, there is a bug to fix.
v1.9.6 should have fixed this issue, sorry for the trouble!
Thank You for the fast fix, I love the idea of the dedicated slot for the belt. As far as i can tell everything is working as it should.
Thanks!