barneygale / quarry

Python library that implements the Minecraft network protocol and data types
Other
532 stars 74 forks source link

BlockArray.__setitem__ doesn't work when BlockArray is loaded by buffer.unpack_chunk_section #45

Closed apuly closed 6 years ago

apuly commented 6 years ago

The buffer.unpack_chunk_section loads the LightArrays and BlockArray as a tuple (due to the use of the struct.unpack function). Due to the immutable nature of tuples, it is not possible to use the modify the data in the BlockArray, even though the setitemfunction implies that this should be possible.

I've fixed the issue locally by converting the tuple into a list before initialising the BlockArray and LightArrays.

barneygale commented 6 years ago

This should be fixed in quarry 1.0