added nbt+made world actually load

This commit is contained in:
GameHerobrine 2023-02-21 08:14:25 +03:00
parent a9be309de9
commit 8226712597
18 changed files with 1059 additions and 4 deletions

View file

@ -459,8 +459,8 @@ class Player{
}
$pk = new FullChunkDataPacket;
$pk->putInt($X);
$pk->putInt($Z);
$pk->buffer .= Utils::writeInt($X);
$pk->buffer .= Utils::writeInt($Z);
$pk->chunkX = $X;
$pk->chunkZ = $Z;
$pk->data = $this->level->getOrderedChunk($X, $Z, $Yndex);
@ -522,10 +522,10 @@ class Player{
$Yndex |= 1 << $iY;
}
}
$pk = new ChunkDataPacket;
$pk = new FullChunkDataPacket;
$pk->chunkX = $X;
$pk->chunkZ = $Z;
$pk->data = $this->level->getOrderedChunk($X, $Z, $Yndex);
$pk->data = $this->level->getOrderedFullChunk($X, $Z);
$cnt = $this->dataPacket($pk);
if($cnt === false){
return false;