Allow y coordinates bigger 255 (#32)

This commit is contained in:
DarkShadow44 authored and GitHub committed 2025-10-24 05:34:05 +00:00
1 parent f3a0ab0568
commit 3c42abd7ac
1 file changed
+8 -2
@@ -82,7 +82,11 @@ object MultipartCPH extends MultipartPH with IClientPacketHandler {
for (i <- 0 until num)
TileMultipart.handleDescPacket(
world,
indexInChunk(cc, packet.readShort),
new BlockCoord(
packet.readByte + (cc.chunkXPos << 4),
packet.readInt,
packet.readByte + (cc.chunkZPos << 4)
),
packet
)
}
@@ -220,7 +224,9 @@ object MultipartSPH
while (it.hasNext) {
val tile = it.next
if (tile.isInstanceOf[TileMultipart]) {
s.writeShort(indexInChunk(new BlockCoord(tile)))
s.writeByte(tile.xCoord & 0xf)
s.writeInt(tile.yCoord)
s.writeByte(tile.zCoord & 0xf)
tile.asInstanceOf[TileMultipart].writeDesc(s)
num += 1
}