How to get data from blockstates? #463
Replies: 1 comment 1 reply
-
What/where are you doing exactly? For python there is an existing library already for handling the schematic files (although I haven't really looked into it to see how complete it is or what it supports): https://pypi.org/project/litemapy/ But bit-packing basically means that the data is packed into longs by bit shifting, such that there are no unused bits left anywhere except possibly at the end of the last long value in the array. If a given sub-region uses for example 5 unique block state, then you need 3 bits to encode all the possible IDs (0..4), so the blocks for the volume are stored into long ints such that each long holds 21 and 1/3 blocks (64 bits available per long, 3 bits needed per block). |
Beta Was this translation helpful? Give feedback.
-
I read this but I have no idea what bit packing is, can someone please explain how to get block data from a blockstate?
Beta Was this translation helpful? Give feedback.
All reactions