mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-26 15:03:18 +00:00
Allow y coordinates bigger 255 (#32)
This commit is contained in:
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user