Crash with Create mod
lperlaki opened this issue ยท 9 comments
Quick description
The Game crashes on world load if the Create mod and AgriCraft are installed
Related issues and searches
Mods and versions used
- Minecraft: forge-1.16.5-36.1.0
- AgriCraft: 1.16.5-3.0.0
- InfinityLib: 1.16.5-2.0.2
- Create: mc1.16.5_v0.3.1c+151
Steps to replicate the issue
- Load a World
Your environment
- How are you playing?
- Operating System: MacOS and Windows
- Launcher: Minecraft Launcher
- Modpack: -
- What kind of server:
- Singleplayer
- Multiplayer
- Game Modes:
- Survival
- Creative
- Save File:
- Brand new save
- Only an existing save
Links to crash logs, stack traces, etc
Screenshots (or videos)
To nuance: I might be doing something weird that messes up the things they have set up.
In any case, the stacktrace points entirely to Create's codebase, to which I am not familiar, therefore the Create devs are in a better position to debug this than me.
If and when they find the cause for this, and if (a part of) the fix would be on my end, I will happily cooperate with them to fix this.
But for now there is little I can do here.
After some digging, I believe this crash is being caused by DynamicCamera.reset()
in InfinityLib setting Minecraft.renderViewEntity
to null. Changing this.originalCamera
to this.getOriginalRenderViewEntity()
on line 320 of DynamicCamera.java may fix the issue.
Interesting, because the following:
- i have managed to reproduce this reliably, and it is happening even when the dynamic camera is not, or has not been used.
- vanilla code allows the renderViewEntity to be null, this is something I verified thoroughly before resetting to null instead of the previous one to avoid issues in case someone takes control of the renderViewEntity while I was using it.
- the NPE is thrown by create fetching their custom renderer from their custom world object.
I will change it to reset back to the client player instance to see if it fixes things.
Changing back to the previous entity lay cause a deadlock in case someone else was controlling the camera before.
Maybe a better solution would be to add a null check on the Create side, since as you said the field is nullable in vanilla code. I'll try it out, and hopefully if it works then your end won't have to change anything
Maybe a better solution would be to add a null check on the Create side, since as you said the field is nullable in vanilla code. I'll try it out, and hopefully if it works then your end won't have to change anything
I already tried that but then the AgriCraft crops won't render.
Ah I think I know what is happening.
I am lazy baking crop models, meaning the quads are not available until they have been rendered at least once.
Create probably doesn't amount for this, and probably wraps up the quads somehow to suit their rendering.
Resulting in agricraft crops not rendering.