Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.13/14/15 support #6

Closed
Gjum opened this issue Apr 4, 2020 · 3 comments
Closed

1.13/14/15 support #6

Gjum opened this issue Apr 4, 2020 · 3 comments

Comments

@Gjum
Copy link
Owner

Gjum commented Apr 4, 2020

The key format changed:

- 42 minecraft:jungle_leaves[distance=5,persistent=false]
+ 42 Block{minecraft:jungle_leaves}[distance=5,persistent=false]

the data format changed: there seem to be 18 bytes per block now, instead of the previous 17. My guess is that it stores isWaterlogged and maybe other flags. update: the added byte resulted from changing biome id from u8 to u16

Note: for more details on the format changes, see #7.

Ideally the implementation will be backward compatible.

The downside to 1.13: all your world maps will have to start over. Mojang has for ages been saying not to store block data as integers. Over a year ago, to get ready for this, I moved away from storing as int. Each block is stored as its blockstate, so if the underlying ints change they would still show up on the map just fine. HOWEVER in 1.13, Mojang went and changed a bunch of the blockstates, so that was basically for nothing. They wrote a big old converter to convert old worlds to the new values, and I am not going to replicate that so maps are unfortunately wiped. Hopefully they don't change blockstates any more (ie the flattening should allow them to have more or less final values) so this shouldn't happen again, but it is a thing.
context

Due to Mojang changing blockstates for 1.13, maps from 1.12.2 and earlier are not compatible with 1.13 and up. Voxelmap will have to regenerate the worldmap. If it is doing so from a single player save, it can take a while. You should see it get out a region or two before too long though, so if it just remains black that's a bit of an issue context

This also highlights the ups and downs of storing block data vs storing an image for the world map. Storing the data lets one display the map in such a way that it always matches the current texture pack, or time of day or whatever. Storing it as an image removes that flexibility, but it also wouldn't go away if Mojang changed the data out from under you. So maybe those other map mods have it right. context

@Gjum Gjum changed the title 1.15 support 1.13/14/15 support Apr 4, 2020
@Gjum
Copy link
Owner Author

Gjum commented Aug 9, 2020

@Gjum
Copy link
Owner Author

Gjum commented Mar 8, 2021

fixed in 614db17

@Gjum
Copy link
Owner Author

Gjum commented Mar 8, 2021

Ideally the implementation will be backward compatible.

tracked in #7

bonus: update the rendering code to take waterlogged blocks into account

waterlogged is probably indicated via the block properties (see key). It's automatically handled by using the Voxelmap builtin renderer, and I can't think of where else we'd want to use that property, so I consider this done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant