Closed dedo1911 closed 5 years ago
Same issue here. Can't seem to unpack a chunk. Are we sure is a varint?
The 'Chunk Data' packet has more fields that you'll need to unpack first, such as chunk coords, bitmask, heightmap, etc. unpack_chunk_section()
only helps with the chunk sections. There's some code here which works for 1.13: https://github.com/barneygale/minebnc/blob/master/plugins/world.py#L73
If you want to adapt the code above, I think you need an additional buff.unpack_nbt()
to load the heightmap as of 1.14.
Any joy?
I just a bit of time last night to give it a try but still I get errors on unpack_nbt, tonight I'll try again and see If I can get it to work or ask/report something useful here to get that done Thanks for the moment
This should work for 1.14.4 if you're using the latest (master
) version of quarry:
def packet_chunk_data(self, buff):
x, z, full = buff.unpack('ii?')
bitmask = buff.unpack_varint()
heightmap = buff.unpack_nbt()
sections, biomes = buff.unpack_chunk(bitmask, full)
block_entities = [buff.unpack_nbt() for _ in range(buff.unpack_varint())]
Hi, I'm playing around and trying to get block names. I've already loaded the LookupRegistry and so on, but at the downstream_chunk_data I keep getting an error during unpack_chunk_section: builtins.ValueError: varint does not fit in range: -2147483648 <= 65766686694 < 2147483648
Also, I think that unpack_chunk_section documentation is outdated (at least for 1.14) as it's only returning blocks as far as I saw. Any help is apreciated.