Closed mkuw closed 5 years ago
Nice, you found the cause of these ugly plots on the map I was wondering about. Thank you !
Thanks, @mkuw
@mfld-fr Any chance you can write a test for _init_index
?
Mmm... either that method is already covered by testing the map example on a recent world (as suggested in #113), OR we complement the get_block
with a set_block
+ variable bit length encoding to have a read / write loop for a comprehensive unit test for all the possible lengths.
Personally, I don't need to write blocks, so I would not invest time in option 2. And for option 1, this PR demonstrates the map example is very attractive, so our kind users already do the job :wink:...
I am not sure but it seems that the bitwise and should be a bitwise or. At least this fixes some problems I am encountering when plotting maps.
In particular, when the palette requires 5 bits entries, I am getting an artifact each 13 blocks. So each time the entry is written on two different longs of the state array.
Look at those chunk slices: after the fix before the fix