[1.12.2] NPE After Saving with Riding Entity
naqaden opened this issue ยท 2 comments
Expected Behavior
The world loads with the player carrying the entity.
Actual Behavior
NPE crash
Steps to Reproduce
- Install Carry On
- Install Animania Base & Extra.
- Install Name Pain.
- Get a hamster on your shoulder.
- Save and exit that world.
- Load that world.
Doing these same steps without Carry On installed will not cause a crash.
While removing Name Pain dodges the crash, it's because it listens to RenderLivingEvent.Specials.Pre where entities should not be null, but they are when saved and loaded while riding players with Carry On. Related issues can be found here and here.
As the author of Name Pain, I will start catching null entities to avoid this, but I figured it should be patched here too.
Version of Minecraft, Carry On, Forge
MC v1.12.2
Forge v14.24.5.2854
Carry On v1.12.3.15
Animania Base v2.0.3.28 v1.7.3
Animania Extra v1.0.2.28
Name Pain v1.3.1 v1.2.1
I'm not able to recreate this. Was the hamster named or something? Also, I'm not sure why/how a RenderLivingEvent could even be fired for a null entity. Could I see the code for your handling of RenderLivingEvent.Specials.Pre?