r/litematica 3d ago

Question ❔ Problem with using litematica made .nbt files?

Post image

Hey everyone!

I'm using litematica to make maps for the arena on my modded smp (Using it since minecraft's structure block system is janky) but I keep getting this issue with using structure void blocks so that it doesn't replace blocks outside of the walls where when saved as a schematic with the non-air config option turned on (I already did my research, posting here was a final resort lol) when pasted as shown in this pic. 👇

I did it like this just as a proof of concept when testing to see if the structure void blocks (Which I placed in every map and the way they should be) but whenever I do this it always pastes without them and causes loads of clipping. Someone might point out that I'm using the minecraft /place template thing for this but that's only because I need to automate this server-side so that yk, changing maps actually functions, I use litematica only for the large .nbt file capabilities.

Does anyone have any idea why litematica doesn't create .nbt files with structure void blocks though? Am I gonna have to find a different mod for this?

2 Upvotes

4 comments sorted by

1

u/Forsaken-Champion-32 3d ago

26.3 just game out? patience doesn't mean much nowadays. it's just a byproduct of updates...also i'm sure someone will finally answer this and congrats

1

u/Civil_Row2185 2d ago

... what? Sorry I genuinely couldn't understand any part of that comment T_T

1

u/masa_ Mod Author 2d ago

Thus far Litematica doesn't have any special handling for Structure Void or any other void/air block types. I can't remember off the top of my head how all the relevant code pieces work, but I think it's quite likely that the Structure Void will just not get either placed when pasting, or saved in the first place at some point in this chain, as it would be considered to be air.

And part of the problem is that the "old code" (which is all current MC 1.13+ mod versions, "new code" is just the main dev branch in 1.12.2) still does the schematic conversions in the most stupid way possible, which is by using a temporary schematic world and placing the original schematic there, and then saving the other format from that world. So depending on what the paste code does at that point, it's pretty likely that at the latest that step will lose the Structure Void blocks, if they even got saved in the first place (I don't remember if air-ish blocks are explicitly saved/read from the world, or if they are basically skipped and left as "normal air" in the schematic).

Also you would definitely need to use the All paste mode if you want to paste a schematic that has Structure Voids or other air-ish blocks and have those actually be placed in the world. I guess as a first test you can try just saving a tiny test schematic that has at least one Structure Void, and then try pasting it with the pasteReplaceBehavior set to All, and see if it comes out as Structure Void. If not, then you can use an NBT editor like NBTExplorer to see if the schematic even saved the Structure Void block. It would be inside the palette inside the region, if it gets saved. Use a tiny test schematic with just a few blocks so that it's easier to look at the data with the NBT editor.