RyanLandDev / DFSchematics

Tool to import schematic files into DiamondFire.
14 stars 1 forks source link

Corrupted Schematic #12

Open Eliaz12 opened 1 month ago

Eliaz12 commented 1 month ago

For my plot I am importing node 2 (don't ask why) into my own plot, this already happened flawlessly when importing node 1. I do this by using the litematica mod to create a .litematica file of the spawn and then I use the program 'Lite2Edit' to change that into a .schem. This worked, as I said, perfectly with node 1 but when I tried node 2 the build seemed to be corrupt. Everything looked like it was stretched out, which you can see in the attachment. That is supposed to be node 2, though it looks nothing like it. I am using the latest version of DFSchematics. image

Eliaz12 commented 1 month ago

Here is a picture of what the top looks like, this shows how 'stretched' out everything is. image

RyanLandDev commented 1 month ago

Thank you for the report

Are certain parts of the build built correctly? Or is everything messed up?

Could you try loading the .litematic + the .schem in singleplayer to make sure that the files are correct?

What is the offset set to?

Eliaz12 commented 1 month ago

Are certain parts of the build built correctly? Or is everything messed up: It seems that mostly everything is not built correctly, but it does resemble the spawn though very stretched out. But it isn't just one line consisting of one certain block. Also air doesn't spawn in from what i've seen, only in specific places mostly in the middle of the map. Sorry if this isn't accurate, it's hard to explain as I don't really know what's going on.

Could you try loading the .litematic + the .schem in singleplayer to make sure that the files are correct? I imported the same schematic that I imported into DFSchematic into my own singleplayer world with no problems!

What is the offset set to: It is set to | x0.0 | y0.0 | z0.0 |

RyanLandDev commented 1 month ago

Ah, you said air doesn't spawn in. The behavior of air was changed in the latest update

If you open the function chest of SchematicBuilder, what version does it tell you?

Eliaz12 commented 1 month ago

So I think I found what the problem was, I changed versions of the program while the old code was still inside my plot. This made it not function well. Now I have the updated code from the newest version, though it's still very weird. It has improved but many blocks just don't spawn in and things are all over the place. The attachment shows what it looks like now. image

RyanLandDev commented 1 month ago

That was exactly what I thought.

Regarding the missing blocks, have you let it finish building? Many blocks won't appear at first because the newer version uses block transactions. It will write those at the end (or at 1mil queue).

And you mentioned things are all over the place, you're saying that parts of the build are placed at places they shouldn't be? Are there duplicates of build parts aswell?

I suspect that the cause is the schematic reader (https://github.com/SandroHc/schematic4j) in the program, since you're not the first person experiencing something like this. Since the original author of this library seems to be inactive I may proceed by writing a new library from scratch.

Eliaz12 commented 1 month ago

I haven't been able to let the build finish because whenever it gets near the end it will keep displaying lagslayers which will ramp up in time. It will keep spiking at 100-120% cpu while not placing any more blocks, therefore I haven't seen the actual end result. About that 'things are all over the place': half of the build is at the middle mark while the other half is behind it, shown in the attachment. But since there is not much to do about this, i'll let this go for now. I'm also going on vacation so I won't be able to respond from tomorrow on. image

RyanLandDev commented 1 month ago

Yeah for some reason the cpu builds up after a while for big schematics. I'm gonna have to find a solution for this

For now, for the temporarily solution I'd say you could split the schematic up in multiple schematics.

Fixing these things on my end and rewriting the library will take a while however, since I'm quite busy plus I'm also going on vacation soon