Skip to content

Commit

Permalink
Fixed inconsistent chunk encoding (and writing bogus heightmap for mc…
Browse files Browse the repository at this point in the history
…region)
  • Loading branch information
dktapps committed Nov 29, 2021
1 parent b2c44bb commit e2552d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pocketmine/ChunkStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected function doChunk($data) {
$chunkData .= $blockData;
}
}
$chunkData .= $data['chunk']['biomeColor'] . Binary::writeByte(0) . Binary::writeSignedVarInt(0) . implode('', $data['tiles']);
$chunkData .= $data['chunk']['biomeColor'] . Binary::writeByte(0) . implode('', $data['tiles']);
} else {
$blockIdArray = $data['blocks'];
$blockDataArray = $data['data'];
Expand All @@ -87,7 +87,7 @@ protected function doChunk($data) {
$blockData = "\x00" . $blockIdData . $blockDataData;
$chunkData .= $blockData;
}
$chunkData .= $data['heightMap'] . $data['biomeColor'] . Binary::writeLInt(0) . implode('', $data['tiles']);
$chunkData .= $data['biomeColor'] . Binary::writeByte(0) . implode('', $data['tiles']);
}
$subClientId = $data['subClientId'];
$pk = new FullChunkDataPacket();
Expand Down

1 comment on commit e2552d5

@mopsikzlo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally then

Please sign in to comment.