Lithium breaks Litematica, unable to save schematics.
Version Information
0.18.1+mc1.21.8
Expected Behavior
Litematica should be able to save schematics correctly with all NBT data or whatever.
Actual Behavior
When Lithium is loaded, Litematica fails to save schematics correctly. The schematics are saved with no metadata or information. When you try to load a failed schematic, it will give the error "The schematic doesn't have version information, and can't be safely loaded". The log file does not produce anything to explain what went wrong when a schematic is saved or attempted to be loaded.
Reproduction Steps
- install lithium
- install litematica
- select a region with litematica
- try to save the region as a schematic
- you will see that the schematic shows no metadata in the info panel, and cannot be loaded.
Other Information
CachyOS Linux eclipse_temurin_jre21.0.8+9
mods loaded: Fabric API Litematica Lithium MaLiLib
With a fresh setup I am able to create litematics and load them again. Works with both simple and normal area selection mode.
Loading Minecraft 1.21.8 with Fabric Loader 0.17.3
Loading 50 mods:
- fabric-api 0.134.0+1.21.8
|-- fabric-api-base 0.5.0+cd8c0daa2c
|-- fabric-api-lookup-api-v1 1.6.101+946bf4c32c
|-- fabric-biome-api-v1 16.1.0+c21d71cc2c
|-- fabric-block-api-v1 1.1.3+946bf4c32c
|-- fabric-block-view-api-v2 1.0.31+946bf4c32c
|-- fabric-command-api-v2 2.3.1+52fff9ec2c
|-- fabric-content-registries-v0 10.1.0+c75de69d2c
|-- fabric-convention-tags-v1 2.1.41+7f945d5b2c
|-- fabric-convention-tags-v2 2.15.6+eb5df52f2c
|-- fabric-crash-report-info-v1 0.3.15+946bf4c32c
|-- fabric-data-attachment-api-v1 1.8.13+38b5f74e2c
|-- fabric-data-generation-api-v1 23.2.7+2e1c6d322c
|-- fabric-dimensions-v1 4.0.20+948fc79a2c
|-- fabric-entity-events-v1 2.1.2+c9e472732c
|-- fabric-events-interaction-v0 4.0.25+946bf4c32c
|-- fabric-game-rule-api-v1 1.0.73+c64c9c5b2c
|-- fabric-item-api-v1 11.5.0+02ce13f42c
|-- fabric-item-group-api-v1 4.2.14+c5f9bbc12c
|-- fabric-key-binding-api-v1 1.0.65+946bf4c32c
|-- fabric-lifecycle-events-v1 2.6.4+db4dfd852c
|-- fabric-loot-api-v2 3.0.56+3f89f5a52c
|-- fabric-loot-api-v3 2.0.3+946bf4c32c
|-- fabric-message-api-v1 6.1.2+946bf4c32c
|-- fabric-model-loading-api-v1 5.2.7+946bf4c32c
|-- fabric-networking-api-v1 5.0.3+4ddbf91b2c
|-- fabric-object-builder-api-v1 21.1.9+946bf4c32c
|-- fabric-particles-v1 4.1.9+946bf4c32c
|-- fabric-recipe-api-v1 8.1.16+946bf4c32c
|-- fabric-registry-sync-v0 6.1.29+946bf4c32c
|-- fabric-renderer-api-v1 7.0.4+208eed172c
|-- fabric-renderer-indigo 4.0.4+946bf4c32c
|-- fabric-rendering-fluids-v1 3.1.31+fa6cb72b2c
|-- fabric-rendering-v1 12.5.1+fbe231d52c
|-- fabric-resource-conditions-api-v1 5.0.25+98e6d6db2c
|-- fabric-resource-loader-v0 3.1.12+020423442c
|-- fabric-screen-api-v1 2.2.0+e0cb65d02c
|-- fabric-screen-handler-api-v1 1.3.138+946bf4c32c
|-- fabric-serialization-api-v1 1.0.0+fc0e5aba2c
|-- fabric-sound-api-v1 1.0.42+946bf4c32c
|-- fabric-tag-api-v1 1.2.2+946bf4c32c
|-- fabric-transfer-api-v1 6.0.6+946bf4c32c
\-- fabric-transitive-access-wideners-v1 6.5.0+c847ce762c
- fabricloader 0.17.3
\-- mixinextras 0.5.0
- java 21
- litematica 0.23.4
- lithium 0.18.1+mc1.21.8
- malilib 0.25.5
- minecraft 1.21.8
Can try without lithium installed?
Can try without lithium installed?
I tried with just lithium and litematica, didn't work.
Try litematica on its own, does work.
Try litematica with my giant clientside modpack (minus lithium), does work.
Can you post the logfile of lithium + litematica where it doesn't work
Interesting.
Same issue on 1.21.10. Issue is dependent on size of schematic (large schematics fail to save). https://github.com/sakura-ryoko/litematica/issues/267
Disabling lithium on my main installation fixes the issue. Could NOT replicate using a fresh install with litematica, lithium, and dependencies. Unsure what exactly contributes to this but lithium is certainly part of it.
Log file included on linked issue.
Running Linux Ubuntu (Zorin)
Can you get a log, enable debugLog ?
2No, I'll get back to you if I find something specific.
https://mclo.gs/qOw7Hst
I have isolated the cause to be mixin.experimental=true in lithium.properties. I believe this setting came from using the Simply Optimized modpack as the base for my installation.
@RainOfPain125 can you try the above and confirm if it is also the cause for you?
Somehow something completely breaks the NBT data structure. I have a broken schematic file from a user in Discord, which is 2.6 MiB in size. When I open it with NBTExplorer 2.8.0, it looks like this:
For example just deleting the IsBaby tag from the top level (or any other tag anywhere) and re-saving drops the file size to 2.7 KiB. So there must be messed up NBT structure that NBTExplorer can't read properly. (And I assume the vanilla NBT parser gives similar results?)
@RainOfPain125 can you try the above and confirm if it is also the cause for you?
The base for my client modpack also comes from Simply Optimized. I don't think I tried a purely vanilla install, instead I (like you, probably) disabled all my mods except lithium & litematica for my Simply Optimized instance.
Presumably the data is still being saved to a certain degree, but the structure is corrupted somehow. I opened it in a binary editor and could spot BlockStatePalette (and its associated data) in there, followed by Blockstates and a lot of repeating data that towards the end becomes all 0s (presumably air).
I have isolated the cause to be
mixin.experimental=trueinlithium.properties. I believe this setting came from using the Simply Optimized modpack as the base for my installation.
My testing was without experimental settings enabled, needs retesting
Doesn't seem like mixin.experimental=true makes a difference. Please provide more detailed steps to reproduce the issue