BetterEnd

BetterEnd

27M Downloads

Vivecraft menu worlds incompatibility

Techjar opened this issue ยท 3 comments

commented

Hello, I'm one of the Vivecraft developers. We noticed a slight incompatibility with your mod. It's nothing game-breaking, it's just that our 3D menu worlds fail to load with your mod installed, due to trying to call methods on a null World object.

[10:53:41] [Worker-Main-6/INFO]: [STDERR]: Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1920.method_8320(net.minecraft.class_2338)" because "view" is null
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_1163.handler$cck000$betterend$be_getWaterColor(class_1163.java:541)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_1163.method_4961(class_1163.java:26)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_775.method_3347(class_775.java:73)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.fabricmc.fabric.impl.client.rendering.fluid.FluidRenderHandlerRegistryImpl.renderFluid(FluidRenderHandlerRegistryImpl.java:126)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandler.renderFluid(FluidRenderHandler.java:86)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_775.tessellateViaHandler(class_775.java:597)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_775.handler$faf000$fabric-rendering-fluids-v1$tesselate(class_775.java:571)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_775.method_3347(class_775.java)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	at net.minecraft.class_776.method_3352(class_776.java:74)
[10:53:41] [Worker-Main-6/INFO]: [STDERR]: 	... 9 more

We found the issue to be caused by this particular line of code.

BlockAndTintGetter view = HAS_SODIUM ? Minecraft.getInstance().level : world;

According to the commit history, this just "fixes issues with Sodium" which is pretty vague. Would you have any idea what this actually fixes? We understand that the code was written before you took over development of the mod, and thus you may not know, but we'd appreciate if you could investigate. It seems to date back to 1.16 so we wonder if it's even still necessary. For what it's worth, I think we can still fix this from our side if needed, so no worries if you can't or don't want to do anything about it. We'd just prefer if it was fixed on your side, since our fix would have to use a fairly coarse approach.

commented

First off, sorry for the delay and thanks for the investigation and the kind report. This is very appreciated!

The line indeed looks odd, I'll have a test to see if we still need it...

commented

Fix should be in the just released version (4.0.11). Please let me know if there are still errors.

commented

Just a heads up that c95e5ea results in issues with Sodium 0.4.10, a version which people are still using because of Create and Valkyrien Skies.

More info: https://www.reddit.com/r/fabricmc/comments/1943d3k/how_to_solve_visual_glitch_when_using_sodium_0410/ and #330