Closed novitae closed 1 year ago
Big update: it comes from block stretching. You can learn more about this mechanic in the 20w17a snapshot post of mojang, at "BLOCK STORAGE". Your code doesn't implement stretching.
stretched | not stretched |
---|---|
Here you have a python code that reads, and checks for the version to know if it will use stretching or not during decoding. It should only take you very few lines and would fix the issue.
I am experiencing this issue where, when the bit length of the palette is longer than 4, and so the length of the block states array is higher than 256, the section of the anvil file completely bugs out and generated weird stuff. Here is are examples:
I think it might come from the line: https://github.com/misode/vscode-nbt/blob/b868e5725171563d6b4ddd5f083dcb6ae0d58130/src/editor/ChunkEditor.ts#L57 Since it is the only real difference I see from a cython decoder I made that works well: