paulevsGitch / BetterEnd

Better End MC Mod
MIT License
101 stars 85 forks source link

[1.18.1] Incompatibility Crash with Nox - A Mob and Difficulty Overhaul #411

Open mr-poyo opened 2 years ago

mr-poyo commented 2 years ago

Hello,

I am experiencing a crash when exploring the End with the BetterEnd mod installed with Nox - A Mob and Difficulty Overhaul. It seems to occur when the chunk attempts to spawn an End Slime. I have made a fresh pack with just Nox and BetterEnd to confirm the incompatibility. Similarly, I am unable to use Endslime spawn eggs (although instead of crashing, it just doesn't spawn anything)

Minecraft Version: 1.18.1 Fabric API: 0.12.12 nox-1.0.0.jar better-end-1.0.0.jar bclib-1.2.4.jar crash log: https://pastebin.com/v9Vy8WGV

Posting on both mod issues just in case :D. Thank you! https://github.com/stormdirus2/nox/issues/9

paulevsGitch commented 2 years ago

Hi, I thought that I saw that issue before and already answered, but I can't find it again, so here is an answer: The exception that you get:

Cannot invoke "net.minecraft.class_1324.method_26837(net.minecraft.class_1322)" because the return value of "net.minecraft.class_1621.method_5996(net.minecraft.class_1320)" is null

Can be readed like this:

Cannot invoke "AttributeInstance(AttributeModifier)" because the return value of "Slime.getAttribute(Attribute)" is null

Which means that this code was probably executed before entity get attributes. The simples solution will be to check if entity attribute is not null before modification inside nox$modifyAttributes