diff --git a/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py b/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py index 0ccbb92..033a6df 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py @@ -112,12 +112,12 @@ class PacketMultiBlockChange(Packet): 734 : [ ( 'chunkX', Int ), ( 'chunkZ', Int ), ( 'records', ArrayType(StructType(( 'horizontalPos', Byte ), ( 'y', Byte ), ( 'blockId', VarInt ), ), VarInt, ) ) ], 735 : [ ( 'chunkX', Int ), ( 'chunkZ', Int ), ( 'records', ArrayType(StructType(( 'horizontalPos', Byte ), ( 'y', Byte ), ( 'blockId', VarInt ), ), VarInt, ) ) ], 736 : [ ( 'chunkX', Int ), ( 'chunkZ', Int ), ( 'records', ArrayType(StructType(( 'horizontalPos', Byte ), ( 'y', Byte ), ( 'blockId', VarInt ), ), VarInt, ) ) ], - 751 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], - 755 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], - 756 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], - 757 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], - 758 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], - 759 : [ ( 'chunkCoordinates', Int ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ], - 760 : [ ( 'chunkCoordinates', Int ), ( 'suppressLightUpdates', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ], - 761 : [ ( 'chunkCoordinates', Int ), ( 'suppressLightUpdates', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ] + 751 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], + 755 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], + 756 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], + 757 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], + 758 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(TrailingData, VarInt, ) ) ], + 759 : [ ( 'chunkCoordinates', Long ), ( 'notTrustEdges', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ], + 760 : [ ( 'chunkCoordinates', Long ), ( 'suppressLightUpdates', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ], + 761 : [ ( 'chunkCoordinates', Long ), ( 'suppressLightUpdates', Boolean ), ( 'records', ArrayType(VarInt, VarInt, ) ) ] } diff --git a/compiler/proto.py b/compiler/proto.py index a86e023..104a048 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -162,7 +162,13 @@ def mctype(slot_type:Any) -> Ref: mctype(v["default"]) if "default" in v and v['default'] != 'void' else None, ) elif t == "bitfield": - return Ref('Int') # TODO + # TODO can be made better... + size = 0 + for field in v: + size += field["size"] + if size <= 32: + return Ref('Int') + return Ref('Long') # elif t == "mapper": # ???? # return TrailingData else: