From c61e4adcf16ef351f8ad222634af8d7e5f3ef62e Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Thu, 8 Jan 2015 23:27:14 +0100 Subject: [PATCH] Improved chunk ticking a bit more --- src/pocketmine/level/Level.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/level/Level.php b/src/pocketmine/level/Level.php index fb20e8e51e..54c775f22f 100644 --- a/src/pocketmine/level/Level.php +++ b/src/pocketmine/level/Level.php @@ -608,7 +608,7 @@ class Level implements ChunkManager, Metadatable{ $dx = mt_rand(-$randRange, $randRange); $dz = mt_rand(-$randRange, $randRange); $hash = Level::chunkHash($dx + $x, $dz + $z); - if(!isset($this->chunkTickList[$hash]) and $this->isChunkLoaded($dx + $x, $dz + $z)){ + if(!isset($this->chunkTickList[$hash]) and isset($this->chunks[$hash])){ $this->chunkTickList[$hash] = -1; } } @@ -659,7 +659,7 @@ class Level implements ChunkManager, Metadatable{ } } }else{ - for($Y = 0; $Y < 8 and ($Y >= 4 and $blockTest !== 0); ++$Y){ + for($Y = 0; $Y < 8 and ($Y < 3 or $blockTest !== 0); ++$Y){ $blockTest = 0; $k = mt_rand(0, 0x7fffffff); for($i = 0; $i < 3; ++$i, $k >>= 10){