Seemingly Missing Textures / NullPointerException when running the mod in combination with Sodium
ChaoticByte opened this issue ยท 2 comments
Today I tried this mod and observed the following:
I was playing with several mods on Minecraft 1.19.2, but could reproduce the issue with just the following three mods:
- fabric-api-0.76.0+1.19.2.jar
- Modern-Dynamics-0.6.1-beta.jar
- sodium-fabric-mc1.19.2-0.4.4+build.18.jar
After disabling Sodium, the pipes and cables rendered correctly.
Here is a excerpt from the Minecraft log:
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:fluid_pipe#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:hv_cable#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:item_pipe#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:ev_cable#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:mv_cable#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:item_pipe#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:hv_cable#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:superconductor_cable#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:mv_cable#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:superconductor_cable#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:lv_cable#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:mv_cable#waterlogged=true': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:lv_cable#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:ev_cable#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:lv_cable#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:ev_cable#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:superconductor_cable#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:item_pipe#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:hv_cable#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:fluid_pipe#waterlogged=false': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
[21:46:34] [Render thread/WARN]: Unable to bake model: 'moderndynamics:fluid_pipe#inventory': java.lang.NullPointerException: Cannot invoke "net.fabricmc.fabric.api.renderer.v1.Renderer.meshBuilder()" because the return value of "net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()" is null
I'm don't know how all this Rendering API stuff works, but I guess that Sodium is overwriting net.fabricmc.fabric.api.renderer.v1.RendererAccess.getRenderer()
, making it unusable for this mod.
Maybe there is another method to get the current renderer (when detecting Sodium)?