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

compatibility with new data format #7

Open
1 task
Gjum opened this issue Mar 8, 2021 · 0 comments
Open
1 task

compatibility with new data format #7

Gjum opened this issue Mar 8, 2021 · 0 comments

Comments

@Gjum
Copy link
Owner

Gjum commented Mar 8, 2021

To do:

  • load "18-based interleaved" ("v2")

#6 added 1.13+ VoxelMap compatibility, which was also retrofit for Forge 1.12.

The current implementation has a work-in-progress for reading/writing "version 2" format, but has some bugs (looks weird when rendered with VoxelMap).
It could also be useful to be able to also read "version 1" and the old data in the "legacy" formats (up to 1.12.2 LiteLoader).

I've decided to name the known formats: legacy A, legacy B, v1, and v2.

The format of a tile zip can be inferred from the contained files:

  • key: assigns numeric ids to the blocks present in a tile
    • absent: legacy A
    • "old" format: legacy B. 42 minecraft:jungle_leaves[distance=5,persistent=false]
    • "new" format: v1/v2. 42 Block{minecraft:jungle_leaves}[distance=5,persistent=false]
  • control: contains version entry
    • absent: v1 or lower
    • version=2: v2
    • anything else: unexpected, not supported
  • data
    • 17x256x256 bytes: legacy A or B (always grouped byte order)
    • 18x256x256 bytes: v1 or v2 (can't discern grouped vs interleaved byte order)
Legacy A Legacy B v1 v2
key absent control absent data 17 x
key old control absent data 17 x
key new control absent data 18 x
key new control v=1 data 18 x
key new control v=2 data 18 x

legacy A:

  • data: 17 based -> convert data
  • key: absent -> convert key using The Flattening via global palette
  • control: absent

legacy B:

  • data: 17 based -> convert data
  • key: old fmt -> convert key using The Flattening
  • control: absent

v1:

  • data: 18 based, grouped -> convert data
  • key: new/old? -> probably always new; otherwise convert
  • control: absent, or maybe 1

v2:

  • data: 18 based, interleaved
  • key: new
  • control: version=2
@Gjum Gjum mentioned this issue Mar 8, 2021
@Gjum Gjum changed the title compatibility with old data format compatibility with new data format Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant