ldtteam / Structurize

Minecraft Structures
GNU General Public License v3.0
45 stars 45 forks source link

Loading blueprints from newer vanilla version should be impossible/have warning mechanism #621

Open Nightenom opened 10 months ago

Nightenom commented 10 months ago

Is there an existing issue for this?

Are you using the latest Structurize Version?

Did you check on the Wiki? or ask on Discord?

Minecraft Version

1.19

Structurize Version

dev

MineColonies Version (if related bug)

unrelated

Related Mods and their Versions

No response

Current Behavior

When trying to load blueprint that has newer mcversion than current running SharedConstants.getCurrentVersion().getDataVersion().getVersion() then the either show unloadable warning or don't show the blueprint at all. However the blueprint must be never deserialized

Expected Behavior

No errors :D

Reproduction Steps

Try to load 1.20 scan in 1.19

Logs

logs getting spammed with vanilla deserialization errors

Anything else?

No response

Footer


Viewers

Raycoms commented 10 months ago

Why?

Nightenom commented 10 months ago

Warning tooltip/red text/sth similar is also fine, plus dont read blockstates/entities/BEs in ui

Thodor12 commented 10 months ago

This would make it a little bit difficult for cases where you have your schematic server on 1.20, but want to provide your schematic for 1.19.2 too.

That would essentially force you having to have multiple schematic servers per MC version

Nightenom commented 10 months ago

Well have server in 1.19 then :D since you want version compat you can't use any 1.20 content -> u don't need 1.20 server? Like loading content from newer versions will never be stable and is pure luck in means of content equality (note: data upgrading is fully supported, so 1.19 schematic will load just the same in 1.20 - as long as mojang did not screw up in dfu)

Thodor12 commented 10 months ago

By the same logic I've seen schematics break as soon as they use blocks that only exist in newer Domum versions, those are also being loaded in just fine.

thepriz commented 9 months ago

I wouldn't block it completely. A warning would be good, not sure if it is necessary. I just recently did some scans in 1.20.1 only using vanilla blocks (not including newly released blocks) but decided to port them back to my main schematic server in 1.19.2. I moved the scans over to the 1.19.2 server and was able to add them to my main schematic server in 1.19.2. This would be impossible if it was just rejected outright.

MotionlessTrain commented 9 months ago

I wouldn't block it completely. A warning would be good, not sure if it is necessary. I just recently did some scans in 1.20.1 only using vanilla blocks (not including newly released blocks) but decided to port them back to my main schematic server in 1.19.2. I moved the scans over to the 1.19.2 server and was able to add them to my main schematic server in 1.19.2. This would be impossible if it was just rejected outright.

Even just using vanilla blocks won't guarantee blueprints will work correctly in earlier minecraft versions. E.g. the way how text on signs is stored has been changed in 1.20, and minecraft converts those when you port a world to 1.20 (or when 1.19.2 blueprints are opened in 1.20, for that matter) There is no conversion back, though, so a 1.20 world or blueprint won't have signs with text in 1.19.2 (which in case of minecolonies' mineshafts can be problematic)