proper hashing of blockpos

This commit is contained in:
əlemi 2021-12-12 02:18:23 +01:00
parent 9a19b417bf
commit 3b7581a03a

View file

@ -191,7 +191,7 @@ class PositionType(Type):
def write(self, data:tuple, buffer:io.BytesIO, ctx:object=None): def write(self, data:tuple, buffer:io.BytesIO, ctx:object=None):
packed = ((0x3FFFFFF & data[0]) << 38) \ packed = ((0x3FFFFFF & data[0]) << 38) \
| ((0xFFF & data[1]) << 12) \ | ((0xFFF & data[1]) << 26) \
| (0x3FFFFFF & data[2]) | (0x3FFFFFF & data[2])
UnsignedLong.write(packed, buffer, ctx=ctx) UnsignedLong.write(packed, buffer, ctx=ctx)