sending tile entities only once

This commit is contained in:
GameHerobrine 2023-12-01 11:15:51 +03:00
parent 03d5a05149
commit 0e796c8dd3
2 changed files with 28 additions and 17 deletions

View file

@ -492,7 +492,7 @@ class Player{
}
}
$tiles = $this->server->query("SELECT ID FROM tiles WHERE spawnable = 1 AND level = '" . $this->level->getName() . "' AND x >= " . (($X << 4) - 1) . " AND x < " . (($X << 4) + 17) . " AND z >= " . (($Z << 4) - 1) . " AND z < " . (($Z << 4) + 17) . ";");
/*$tiles = $this->server->query("SELECT ID FROM tiles WHERE spawnable = 1 AND level = '" . $this->level->getName() . "' AND x >= " . (($X << 4) - 1) . " AND x < " . (($X << 4) + 17) . " AND z >= " . (($Z << 4) - 1) . " AND z < " . (($Z << 4) + 17) . ";");
$this->lastChunk = false;
if($tiles !== false and $tiles !== true){
while(($tile = $tiles->fetchArray(SQLITE3_ASSOC)) !== false){
@ -501,7 +501,7 @@ class Player{
$tile->spawn($this);
}
}
}
}*/
//$this->stopUsingChunk($X, $Z); //just in case
$pk = new FullChunkDataPacket;
$pk->chunkX = $X;