JER causing errors or crashes when viewing Mob Drops window containing mobs "ponified" by Mine Little Pony mod.
KandiPanda opened this issue ยท 9 comments
Does not have problems with non-ponified mobs.
With MineLP 1.12.2.3.2.4, ponified mobs simply don't display in the JER Mob Drops window, and the log file is spammed many times per second with [Client thread/ERROR] [net.minecraft.client.renderer.entity.RenderLivingBase]: Couldn't render entity java.lang.NullPointerException: null
multiple times per second.
With MineLP 1.12.2.3.2.6 or 1.12.2.3.2.7, the game completely crashes when trying to view a Mob Drops window, with the error in the log starting with Description: Rendering entity in world java.lang.NullPointerException: Rendering entity in world
.
Discussing it with a dev of that mod, they tell me that the issue is that your dummy world should be passing an empty chunk full of air, rather than passing a null chunk as it currently does.
The versions of their mod mentioned above can be found on this releases page.
Not sure which of these you wanted, so I grabbed all of them, if any are unneded just let me know and I can make them go away:
I've encountered related problem when trying to add integration with other mods. I'm running on 1.12.2-0.9.2.60, and if you want to know which entities it happens with, it's a few entities from Mo' Creatures - turtle, snake, and all medium fish.
In my case, the entity renderer is trying to call boolean isInsideOfMaterial(Material materialIn)
from the class Entity
, which then is trying to call IBlockState getBlockState(BlockPos pos)
, which is then trying to call Chunk getChunk(BlockPos pos)
(both of these inside the World
class).
Looking at the crash log provided by @KandiPanda it looks like the crash is caused by call to boolean isOnLadder()
inside of EntityLivingBase
class, which is also trying to call IBlockState getBlockState(BlockPos pos)
.
I'm not sure if it'd solve both issues or not, but I think that one way to solve (besides returning a chunk filled with air) could be to override getBlockState
and return Blocks.AIR.getDefaultState();
inside of your FakeClientWorld
.
Not really a fan of returning a default blockstate, but I'll think about it if the World is supposed to be "non-null".
I've managed to fix it on my side by replacing the rendering code used by entities from other mods causing issues, and checking if the world is an instance of FakeClientWorld to do rendering without using the world.
It might be a little hacky, but it works. I know that it doesn't really help solve the original issue, but I'm just posting here to make it more clear that there's one less person with one less mod needing a change there.
I'm a little curious why you need to use a fake world for this at all when the client has the real world which will work just fine.
Refer to this for a working dummy world: https://github.com/MineLittlePony/HDSkins/blob/master/src/main/java/com/minelittlepony/hdskins/dummy/DummyWorld.java
@Sollace might be legacy from older version where the client didn't have a real world when playing on a server. Will checkout your dummy and compare.