diff --git a/src/Player.php b/src/Player.php index b6bd45818..46018d104 100644 --- a/src/Player.php +++ b/src/Player.php @@ -130,13 +130,13 @@ class Player{ "x" => '.$X.', "z" => '.$Z.', "data" => $d, - ), true); + )); } $tiles = $this->server->query("SELECT * FROM tileentities WHERE spawnable = 1 AND x >= '.$x.' AND x < '.($x + 16).' AND z >= '.$z.' AND z < '.($z + 16).' AND y >= '.$y.' AND y < '.($y + 16).';"); if($tiles !== false and $tiles !== true){ while(($tile = $tiles->fetchArray(SQLITE3_ASSOC)) !== false){ - $this->server->api->tileentity->spawnTo($tile["ID"], "'.$this->username.'", true); + $this->server->api->tileentity->spawnTo($tile["ID"], "'.$this->username.'"); } } $this->actionQueue(\'$this->getNextChunk();\'); @@ -153,8 +153,8 @@ class Player{ $this->close("timeout"); }else{ if(!empty($this->queue)){ - $maxtime = $time + 0.0025; - while(microtime(true) < $maxtime){ + $cnt = 0; + while($cnt < 4){ $p = array_shift($this->queue); if($p === null){ break; @@ -167,6 +167,7 @@ class Player{ eval($p[1]); break; } + ++$cnt; } }