ModernFix

ModernFix

72M Downloads

Dynamic Resources crash after running /reload with Spectrum/Revelationary

mosharky opened this issue ยท 2 comments

commented

Bug Description

Seems like a conflict between Revelationary and ModernFix's dynamic resources. Spectrum relies on Revelationary; I guess the game will crash if Revelationary is being used in a chunk since Revelationary & RevelationaryJS alone won't crash my game.

Relevant error message:

[16:41:58] [Render thread/ERROR]: Unhandled game exception
net.minecraft.class_148: Encountered exception while building chunk meshes
	at me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.fillCrashInfo(ChunkBuilderMeshingTask.java:168) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	at me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:135) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	at me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:39) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	at me.jellysquid.mods.sodium.client.render.chunk.compile.executor.ChunkJobTyped.execute(ChunkJobTyped.java:44) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	at me.jellysquid.mods.sodium.client.render.chunk.compile.executor.ChunkBuilder$WorkerRunnable.run(ChunkBuilder.java:186) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2960.method_12836()" because "location" is null
	at org.embeddedt.modernfix.dynamicresources.DynamicBakedModelProvider.isVanillaTopLevelModel(DynamicBakedModelProvider.java:133) ~[modernfix-fabric-5.19.7+mc1.20.1.jar:?]
	at org.embeddedt.modernfix.dynamicresources.DynamicBakedModelProvider.get(DynamicBakedModelProvider.java:163) ~[modernfix-fabric-5.19.7+mc1.20.1.jar:?]
	at org.embeddedt.modernfix.dynamicresources.DynamicBakedModelProvider.get(DynamicBakedModelProvider.java:29) ~[modernfix-fabric-5.19.7+mc1.20.1.jar:?]
	at java.util.Map.getOrDefault(Map.java:671) ~[?:?]
	at net.minecraft.class_1092.method_4742(class_1092.java:71) ~[client-intermediary.jar:?]
	at net.minecraft.class_773.mdc5a26e$modernfix$lambda$replaceModelMap$0$0(class_773.java:532) ~[client-intermediary.jar:?]
	at org.embeddedt.modernfix.util.DynamicMap.get(DynamicMap.java:41) ~[modernfix-fabric-5.19.7+mc1.20.1.jar:?]
	at org.embeddedt.modernfix.util.DynamicOverridableMap.get(DynamicOverridableMap.java:31) ~[modernfix-fabric-5.19.7+mc1.20.1.jar:?]
	at java.util.Map.getOrDefault(Map.java:671) ~[?:?]
	at net.minecraft.class_773.handler$mad000$revelationary$getModel(class_773.java:1031) ~[client-intermediary.jar:?]
	at net.minecraft.class_773.method_3335(class_773.java) ~[client-intermediary.jar:?]
	at me.jellysquid.mods.sodium.client.render.chunk.compile.tasks.ChunkBuilderMeshingTask.execute(ChunkBuilderMeshingTask.java:97) ~[sodium-fabric-0.5.11+mc1.20.1.jar:?]
	... 4 more

Reproduction Steps

  • Install Revelationary and Spectrum
  • set mixin.perf.dynamic_resources=true
  • Join singleplayer world
  • Run /reload command

Log File

https://mclo.gs/WS3OaD4

commented

I was not able to reproduce this, but in theory the build from the commit linked above will fix this.

commented

My guess is that you'd have to render a chunk with a block that interacts with Revelationary to reproduce, but frankly I have not pinned it down to specifically Revelationary/Spectrum, I just know that the crash stops when I remove Spectrum. I'll let you know if this fixes it whenever you release a build with this commit.