PhpStorm inspections

Fixed some minor bugs and dropped some obsolete code

pocketmine\level\generator namespace is ignored in this commit
This commit is contained in:
SOFe
2016-10-21 22:38:49 +08:00
committed by Dylan K. Taylor
parent e790573f2e
commit 175dd0efa6
21 changed files with 46 additions and 38 deletions

View File

@@ -287,6 +287,11 @@ class Level implements ChunkManager, Metadatable{
}
}
/**
* @param string|int $hash
* @param int|null $x
* @param int|null $z
*/
public static function getXZ($hash, &$x, &$z){
if(PHP_INT_SIZE === 8){
$x = ($hash >> 32) << 32 >> 32;
@@ -1785,7 +1790,7 @@ class Level implements ChunkManager, Metadatable{
* Returns the entities colliding the current one inside the AxisAlignedBB
*
* @param AxisAlignedBB $bb
* @param Entity $entity
* @param Entity|null $entity
*
* @return Entity[]
*/
@@ -2316,8 +2321,6 @@ class Level implements ChunkManager, Metadatable{
if(count($this->chunkSendQueue) > 0){
$this->timings->syncChunkSendTimer->startTiming();
$x = null;
$z = null;
foreach($this->chunkSendQueue as $index => $players){
if(isset($this->chunkSendTasks[$index])){
continue;
@@ -2778,9 +2781,6 @@ class Level implements ChunkManager, Metadatable{
public function doChunkGarbageCollection(){
$this->timings->doChunkGC->startTiming();
$X = null;
$Z = null;
foreach($this->chunks as $index => $chunk){
if(!isset($this->unloadQueue[$index]) and (!isset($this->usedChunks[$index]) or count($this->usedChunks[$index]) === 0)){
Level::getXZ($index, $X, $Z);