Litematica (Forge)

Litematica (Forge)

336k Downloads

NullPointerException when rendering a schematic placement

dantdmdarealguy opened this issue ยท 5 comments

commented
  • Minecraft version
  • 1.20.1 Fabric
  • Mod version and malilib version
    Litematica 0.15.4, Malilib 0.16.3
    • Include the full mod file name
      the mod file name is just the version of mc and version of the mod (stable build)
      litematica-fabric-1.20.1-0.15.4.jar

If it helps to know, I also have Syncmatica, Litemoretica, Litematica E.C. Materials, Litematica Printer, Litematica Printer Easyplace Extension, Loosen Litematica, and Litematica Server Paster. (all at the latest versions as of 10.6.2024 12:30 gmt-6).
I am fairly sure it is not one of these as disabling them all doesn't stop the crash.
I also use Iris, but it is not that either as turning off shaders/completely disabling iris doesn't fix the crash.

  • A clear description of the issue
    Litematica crashes when rendering a schematic placement because of a null variable not being updated. I am a developer myself but have no clue why it doesn't update this variable. in litematica/src/main/java/fi/dy/masa/litematica/render/schematic
    /WorldRendererSchematic.java
java.lang.NullPointerException: Cannot invoke "fi.dy.masa.litematica.render.schematic.ChunkRenderDispatcherSchematic.scheduleChunkRender(int, int)" because "this.chunkRendererDispatcher" is null
	at fi.dy.masa.litematica.render.schematic.WorldRendererSchematic.scheduleChunkRenders(WorldRendererSchematic.java:801)
	at fi.dy.masa.litematica.world.WorldSchematic.scheduleChunkRenders(WorldSchematic.java:298)
	at fi.dy.masa.litematica.schematic.placement.SchematicPlacementManager.processQueuedChunks(SchematicPlacementManager.java:201)
	at fi.dy.masa.litematica.scheduler.ClientTickHandler.onClientTick(ClientTickHandler.java:32)
	at fi.dy.masa.malilib.event.TickHandler.onClientTick(TickHandler.java:36)
	at MC//net.minecraft.client.MinecraftClient.handler$eop000$malilib$onPostKeyboardInput(MinecraftClient.java:28521)
	at MC//net.minecraft.client.MinecraftClient.tick(MinecraftClient.java:1957)
	at MC//net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1181)
	at MC//net.minecraft.client.MinecraftClient.run(MinecraftClient.java:802)
	at net.minecraft.client.main.Main.main(Main.java:250)
	at app//net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at app//net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at app//net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

Here is my full crash log
crash-2024-10-06_12.15.21-client.txt

commented

Would it possibly be one of these mods?

[10:40:08] [Render thread/INFO]:
Mixing LevelRendererMixin from notenoughanimations.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing blockrenderlayer.WorldRendererMixin from mixins.satin.client.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing event.WorldRendererMixin from mixins.satin.client.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing WorldRendererMixin from seasons.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing core.render.world.WorldRendererMixin from sodium.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing features.options.weather.WorldRendererMixin from sodium.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing features.render.gui.outlines.WorldRendererMixin from sodium.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing features.render.world.clouds.WorldRendererMixin from sodium.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing features.render.world.sky.WorldRendererMixin from sodium.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing mc.MixinWorldRenderer from xaeroplus.mixins.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing Mixin_PostRenderWorldCalback from mixins.core.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing MixinRenderGlobal from mixins.recording.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing Mixin_ChromaKeyColorSky from mixins.render.replaymod.json into net.minecraft.class_761
- antighost 1.20-fabric0.83.0-1.1.5
[10:40:08] [Render thread/INFO]:
Mixing Mixin_ChromaKeyForceSky from mixins.render.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing Mixin_ForceChunkLoading from mixins.render.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing Mixin_SkipBlockOutlinesDuringRender from mixins.render.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing WorldRendererAccessor from mixins.render.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing world_border.Mixin_UseReplayTime_ForTexture from mixins.replay.replaymod.json into net.minecraft.class_761
[10:40:08] [Render thread/INFO]:
Mixing feature.cosmetics.Mixin_UpdateOffscreenPlayers from mixins.essential.json into net.minecraft.class_761
commented

The only way to really know is to try without them, for example first without all of them and if it doesn't crash then you can narrow down which mod exactly.

commented

sorry i only copied half of it on accident

[10:55:55] [Render thread/INFO]:
Mixing CommonWorldRendererMixin from lambdynlights.mixins.json into net.minecraft.class_761
[10:54:54] [ForkJoinPool-1-worker-1/WARN]:
The mod "betterstats" contains invalid entries in its mod json:
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from enhancedblockentities.mixins.json into net.minecraft.class_761
- Unsupported root entry "" at line 26 column 4
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from entityculling.mixins.json into net.minecraft.class_761
- Unsupported root entry "" at line 26 column 92
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from fabric-rendering-v1.mixins.json into net.minecraft.class_761
- Unsupported root entry "" at line 28 column 4
[10:55:55] [Render thread/INFO]:
Mixing KeyedResourceReloadListenerClientMixin from fabric-resource-loader-v0.client.mixins.json into net.minecraft.class_761
- Unsupported root entry "" at line 28 column 24
[10:55:55] [Render thread/INFO]:
Mixing skybox.SkyboxRenderMixin from fabricskyboxes.mixins.json into net.minecraft.class_761
[10:54:54] [ForkJoinPool-1-worker-8/WARN]:
Mod calcmod uses the version fabric-1.20-1.3.0 which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'fabric'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[10:55:55] [Render thread/INFO]:
Mixing skybox.WorldRendererAccess from fabricskyboxes.mixins.json into net.minecraft.class_761
[10:54:54] [ForkJoinPool-1-worker-7/WARN]:
Mod elytra_physics uses the version 2.1_mc1.19.3+ which isn't compatible with Loader's extended semantic version format (Could not parse version number component '1_mc1'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[10:55:55] [Render thread/INFO]:
Mixing accessors.WorldRendererAccessor from feytweaks.mixins.json into net.minecraft.class_761
[10:54:54] [ForkJoinPool-1-worker-4/WARN]:
Mod com_github_rtyley_animated-gif-lib-for-java uses the version animated-gif-lib-1.7 which isn't compatible with Loader's extended semantic version format (Could not parse version number component 'animated'!), SemVer is recommended for reliably evaluating dependencies and prioritizing newer version
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from freecam.mixins.json into net.minecraft.class_761
[10:54:54] [ForkJoinPool-1-worker-1/WARN]:
The mod "tcdcommons" contains invalid entries in its mod json:
- Unsupported root entry "" at line 27 column 4
- Unsupported root entry "" at line 27 column 198
- Unsupported root entry "" at line 29 column 4
[10:55:55] [Render thread/INFO]:
Mixing WorldRenderer_rainMixin from moreculling.mixins.json into net.minecraft.class_761
- Unsupported root entry "" at line 29 column 24
[10:55:55] [Render thread/INFO]:
Mixing accessors.WorldRendererAccessor from moreculling.mixins.json into net.minecraft.class_761
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from music_control.mixins.json into net.minecraft.class_761
[10:54:55] [main/WARN]:
Warnings were found!
[10:55:55] [Render thread/INFO]:
Mixing blockrenderlayer.WorldRendererMixin from mixins.satin.client.json into net.minecraft.class_761
- Mod 'Chat Patches' (chatpatches) 201.5.6 recommends any version of catalogue, which is missing!
[10:55:55] [Render thread/INFO]:
Mixing event.WorldRendererMixin from mixins.satin.client.json into net.minecraft.class_761
- You should install any version of catalogue for the optimal experience.
[10:55:55] [Render thread/INFO]:
Mixing WorldRendererMixin from seasons.mixins.json into net.minecraft.class_761
- Mod 'Chat Patches' (chatpatches) 201.5.6 recommends any version of menulogue, which is missing!
- You should install any version of menulogue for the optimal experience.
- Mod 'Debugify' (debugify) 1.20.1+2.0 recommends any 3.x version of yet-another-config-lib, which is missing!
- You should install any 3.x version of yet-another-config-lib for the optimal experience.
- Mod 'ImmediatelyFast' (immediatelyfast) 1.2.21+1.20.4 recommends any version of sodium, which is missing!
- You should install any version of sodium for the optimal experience.
- Mod 'LambDynamicLights' (lambdynlights) 2.3.2+1.20.1 recommends version 0.19.1 or later of quilt_loader, which is missing!
- You should install version 0.19.1 or later of quilt_loader for the optimal experience.
[10:54:55] [main/INFO]:
Loading 393 mods:
- advancementinfo 1.20-fabric0.83.0-1.4
- ambientsounds 6.1.1
[11:03:08] [pool-10-thread-1/WARN]:
Configuration file C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\ModrinthApp\profiles\Fabric 1.20.1\config\itemborders-common.toml is not correct. Correcting
[10:55:55] [Render thread/INFO]:
Mixing MixinWorldRenderer from mixins.litematica.json into net.minecraft.class_761
[10:55:55] [Render thread/INFO]:
Mixing MixinWorldRenderer from mixins.malilib.json into net.minecraft.class_761
[10:56:39] [Netty Client IO #2/INFO]:
Mixing client.network.CPacketChatMessageAccessor from mixins.essential.json into net.minecraft.class_2797
[10:56:39] [Netty Client IO #2/INFO]:
Mixing fixes.minecraft.packet.MixinChatMessageC2SPacket from viafabricplus.mixins.json into net.minecraft.class_2797
[10:56:39] [Netty Client IO #2/INFO]:
Mixing server.MixinServerboundChatPacket from mixins/common/nochatreports.mixins.json into net.minecraft.class_2797
[10:56:39] [Netty Client IO #2/INFO]:
Mixing server.MixinServerboundChatCommandPacket from mixins/common/nochatreports.mixins.json into net.minecraft.class_7472
[10:56:39] [Netty Client IO #2/INFO]:
Mixing item.packet.SynchronizeRecipesS2CPacketMixin from polymer-core.mixins.json into net.minecraft.class_2788
[10:56:39] [Netty Client IO #2/INFO]:
Mixing other.EntityStatusEffectS2CPacketMixin from polymer-core.mixins.json into net.minecraft.class_2783
[10:56:39] [Netty Client IO #2/INFO]:
Mixing entity.EntityAttributesS2CPacketMixin from polymer-core.mixins.json into net.minecraft.class_2781
[10:56:39] [Netty Client IO #2/INFO]:
Mixing entity.EntityAttachedPacketsMixin from polymer-core.mixins.json into net.minecraft.class_2781
[10:56:39] [Netty Client IO #2/INFO]:
Mixing accessors.EntityPositionS2CPacketAccessor from polymer-virtual-entity.mixins.json into net.minecraft.class_2777
[10:56:39] [Netty Client IO #2/INFO]:
Mixing entity.EntityPositionS2CPacketMixin from polymer-core.mixins.json into net.minecraft.class_2777
[10:55:55] [Render thread/INFO]:
Mixing WorldRenderer_cloudsMixin from moreculling.mixins.json into net.minecraft.class_761
[10:55:55] [Render thread/INFO]:
Mixing feature.cosmetics.Mixin_UpdateOffscreenPlayers from mixins.essential.json into net.minecraft.class_761
commented

The only way to really know is to try without them, for example first without all of them and if it doesn't crash then you can narrow down which mod exactly.

alright I'm going to go do this now

commented

This is probably another case of some mod throwing an exception when loading into the world, which prevents some of Litematica's code from running that would come after that mod.

You can try adding -Dmixin.debug.verbose=true to the JVM arguments, and then in the console/log (after trying to load to a world) look for any mods that apply mixins to WorldRenderer aka. class_761. The offending mod is likely one of the other mods except Litematica that applies some mixins there.