mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
Merge branch 'master' into mcpe-1.0
This commit is contained in:
@@ -285,6 +285,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;
|
||||
@@ -1757,7 +1762,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[]
|
||||
*/
|
||||
@@ -2267,8 +2272,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;
|
||||
@@ -2730,9 +2733,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);
|
||||
|
Reference in New Issue
Block a user