maruohon / litematica

A modern client-side schematic mod for Minecraft
GNU Lesser General Public License v3.0
686 stars 190 forks source link

Loading world crash (99% sure due to breaking sodium changes) #830

Open AlienXtream opened 3 months ago

AlienXtream commented 3 months ago

Please don't post simple questions on this issue tracker!

Simple questions like "How do I do X?" should instead be handled either on the Discussions area (see on the top of the page) or on Discord:

Other rules

Provide at least the following information

Fabric 0.15.7 Minecraft 1.20.1 MLib 0.16.3 Litematica 15.3 Sodium 0.5.8

Crash when loading or creating world. crash is consistent with incompatability with breaking changes in current sodium version. it seems "SodiumWorldRenderer" has been replaced with different methods and so mods that implemented sodium suppoprt need to update their compatability layer to the new methods.

crash-2024-03-28_13.41.47-client.txt

sakura-ryoko commented 3 months ago

if I were you, I would downgrade your Sodium to 0.5.6, because it is more compatible with your other mods, such as sodium-extra, and Iris.

Also, you have A TON of mods installed, so I would recommend running Minecraft (Fabric of course) with Sodium, Malilib, and litematica only and try to reproduce your problem. Running a TON of mods together is generally never a good idea, unless you are 100% sure that they are all 100% compatible with each other, where clearly you are having a mod conflict.

maruohon commented 3 months ago
java.lang.ClassCastException: class fi.dy.masa.litematica.world.WorldSchematic cannot be cast to class net.minecraft.class_638 (fi.dy.masa.litematica.world.WorldSchematic and net.minecraft.class_638 are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @7e0b0338)
    at me.jellysquid.mods.sodium.client.render.SodiumWorldRenderer.redirect$nnb000$valkyrienskies$renderShipBlockEntityInShipyard(SodiumWorldRenderer.java:1572)

Seems like an issue in Valkyrien Skies?

AlienXtream commented 3 months ago

might be. i just recognised the issue as similar to the known sodium issue. if others are aboe to run sodium 0.5.8+ with litematica then i guess i was wrong. i just assumed the VS mixin was unrelated. a bad call on my part if that's not the case (of which i apologise)

maruohon commented 3 months ago

There have been some cases reported earlier as well where some mods assume things to be of certain type, and they try to cast it to some given type without checking instanceof first. And then things crash when it wasn't actually of that type.

So here it looks like Valkyrien Skies assumes that the world the renderer gets always is or extends the vanilla ClientWorld class. But Litematica's schematic world doesn't extend the ClientWorld class, because it was simpler to extend one of the parent classes for my use case.