mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
PhpStorm automated formatting (#11)
* PhpStorm reformatting * Tuned PhpStorm reformatting * Improved ItemIds and BlockIds formatting * Tuned more PhpStorm reformatting * Improved string concatenation
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* All Level related classes are here, like Generators, Populators, Noise, ...
|
||||
@@ -267,7 +267,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
public static function blockHash(int $x, int $y, int $z){
|
||||
return PHP_INT_SIZE === 8 ? (($x & 0xFFFFFFF) << 35) | (($y & 0x7f) << 28) | ($z & 0xFFFFFFF) : $x . ":" . $y .":". $z;
|
||||
return PHP_INT_SIZE === 8 ? (($x & 0xFFFFFFF) << 35) | (($y & 0x7f) << 28) | ($z & 0xFFFFFFF) : $x . ":" . $y . ":" . $z;
|
||||
}
|
||||
|
||||
public static function chunkBlockHash(int $x, int $y, int $z) : int{
|
||||
@@ -378,14 +378,14 @@ class Level implements ChunkManager, Metadatable{
|
||||
public function registerGenerator(){
|
||||
$size = $this->server->getScheduler()->getAsyncTaskPoolSize();
|
||||
for($i = 0; $i < $size; ++$i){
|
||||
$this->server->getScheduler()->scheduleAsyncTaskToWorker(new GeneratorRegisterTask($this, $this->generatorInstance), $i);
|
||||
$this->server->getScheduler()->scheduleAsyncTaskToWorker(new GeneratorRegisterTask($this, $this->generatorInstance), $i);
|
||||
}
|
||||
}
|
||||
|
||||
public function unregisterGenerator(){
|
||||
$size = $this->server->getScheduler()->getAsyncTaskPoolSize();
|
||||
for($i = 0; $i < $size; ++$i){
|
||||
$this->server->getScheduler()->scheduleAsyncTaskToWorker(new GeneratorUnregisterTask($this, $this->generatorInstance), $i);
|
||||
$this->server->getScheduler()->scheduleAsyncTaskToWorker(new GeneratorUnregisterTask($this, $this->generatorInstance), $i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}else{
|
||||
$this->server->batchPackets($players, $pk, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,7 +707,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
foreach($this->moveToSend as $index => $entry){
|
||||
Level::getXZ($index, $chunkX, $chunkZ);
|
||||
foreach($entry as $e) {
|
||||
foreach($entry as $e){
|
||||
$pk = new MoveEntityPacket();
|
||||
$pk->eid = $e[0];
|
||||
$pk->x = $e[1];
|
||||
@@ -901,7 +901,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
Level::getXZ($index, $chunkX, $chunkZ);
|
||||
|
||||
|
||||
|
||||
if(!isset($this->chunks[$index]) or ($chunk = $this->getChunk($chunkX, $chunkZ, false)) === null){
|
||||
unset($this->chunkTickList[$index]);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user