Zokonius / planar-artifice

The Planar Artifice addon for Thaumcraft 6.
MIT License
7 stars 9 forks source link

Thaumometer related crash. #91

Open DaRetroCat opened 2 years ago

DaRetroCat commented 2 years ago

Describe the bug Using the thaumometer on certain mobs causes a client crash.

To Reproduce Steps to reproduce the behavior:

  1. Hold the thaumometer.
  2. Look at either a thaumcraft golem or a firebat.
  3. Crash.

Expected behavior Seeing the entity's aspects similar to other mobs.

Additional context This was tested with only Baubles, JEI, Planar Artifice, and Thaumcraft loaded. Full crash report: https://pastebin.com/iCZmHVpa

KatTheFox commented 11 months ago

I'm also having this issue- and it's almost certainly related to these lines: https://github.com/Zokonius/planar-artifice/blob/1c64a38b7bffdc46a6b838aa809b4daf8fae6830/src/main/java/leppa/planarartifice/registry/PAAspects.java#L322 https://github.com/Zokonius/planar-artifice/blob/1c64a38b7bffdc46a6b838aa809b4daf8fae6830/src/main/java/leppa/planarartifice/registry/PAAspects.java#L307 Adding an aspect (in this case, imperium to golems and infernum to firebats) that does not exist would definitely cause issues. If you add Thaumic Additions (the mod that adds imperium and infernum), the crash should resolve itself. Either mark Thaumic Additions Reconstructed as a hard dependency, or add a check for whether it's loaded. That'll fix the crash.

KatTheFox commented 11 months ago

The same issue is present for Blaze, Ghast, Magma Cube, Zombie Pigman, and the Ender Dragon. Several items have the same issue, but it looks like thaumcraft may handle that more gracefully. Either way, add a check for whether a mod is loaded before you try to use its content, always. Honestly I have no idea how this bug wasn't caught sooner, unless you always play with all the optional dependencies enabled.