NullPointerException rendering blood stained block in inventory
CplPibald opened this issue ยท 5 comments
Issue type:
- ๐ Bug
A player on my server got an evilcraft:blood_stained_block in his inventory, which caused a client crash every time that he opened his inventory. I believe the invalid item was added to the inventory by the Corail Tombstone mod, but EvilCraft probably shouldn't be crashing even if this happens.
java.lang.NullPointerException: Rendering item
at org.cyclops.evilcraft.client.render.model.ModelBloodStainedBlock.getGeneralQuads(ModelBloodStainedBlock.java:50)
at org.cyclops.cyclopscore.client.model.DynamicItemAndBlockModel.func_188616_a(DynamicItemAndBlockModel.java:50)
at org.cyclops.cyclopscore.client.model.DynamicItemAndBlockModel.func_188616_a(DynamicItemAndBlockModel.java:48)
at net.minecraft.client.renderer.RenderItem.func_191967_a(RenderItem.java:122)
The complete NBT for the invalid itemstack is {id: "evilcraft:blood_stained_block"; Count: 1; Damage: 0}
The problem started after the player died while fighting an enderman. My best guess is an enderman picked up a blood stained block and dropped it right when the player died, resulting in that block getting sucked into the tomb with the rest of the items.
Must be because of a recent change: f02c9e1
@josephcsible Could you look into this one? I guess changing the scope of the try-catch should be sufficient.
This happened on 0.10.53, and it looks like a duplicate of #680, which is already fixed in 0.10.54.
@josephcsible Are you sure? The stacktrace seems to indicate that either innerBlockState
or innerBlockState.getBlock()
is null (which was being caught before), as the crash happens inside of ModelBloodStainedBlock#getGeneralQuads
.