barneygale / quarry

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

unpack_chunk no longer works due to changes in packed array structure #100

Closed wgaylord closed 4 years ago

wgaylord commented 4 years ago

The way packed arrays worked has changed which is currently breaking unpack_chunk.

barneygale commented 4 years ago

I'm aware and I'm working on a fix

wgaylord commented 4 years ago

I managed to write a version that works for me for now. So there's no hurry. Just wasn't sure if you knew.

Combustible commented 4 years ago

Any chance you'd be up for pasting some code @wgaylord ? Even a hacky workaround would be valuable to us as well :)

wgaylord commented 4 years ago

https://gist.github.com/wgaylord/ff7ff3d3f328f553586c10109c17ff1d I use this.

barneygale commented 4 years ago

Sorry for the delay on this one! I did all sorts of "clever" things in the previous implementation that no longer apply. Think I've got the implementation mostly there, just updating tests now!

wgaylord commented 4 years ago

No need to be sorry.

barneygale commented 4 years ago

Fix is in master if anyone wants to give it a spin. One test is broken.

The change breaks support for chunk data from 1.15 and below; it's too complicated and slow to support both formats. On the plus side, the implementation is a little simpler and has greater potential for optimization.

wgaylord commented 4 years ago

I will take a look at it today and see if it works out. :)

barneygale commented 4 years ago

Closing this issue as I believe things are working! Let me know if you spot problems.