Improved chunk ticking, enabled again. Disable it setting chunk-ticking.per-tick to 0

This commit is contained in:
Shoghi Cervantes
2014-08-26 11:52:45 +02:00
parent d169734781
commit f74af12914
3 changed files with 57 additions and 27 deletions

View File

@ -23,6 +23,7 @@ namespace pocketmine\block;
use pocketmine\item\Item;
use pocketmine\level\Level;
use pocketmine\level\Position;
class Mycelium extends Solid{
public function __construct(){
@ -44,7 +45,7 @@ class Mycelium extends Solid{
$z = mt_rand($this->z - 1, $this->z + 1);
$block = $this->getLevel()->getBlockIdAt($x, $y, $z);
if($block === Block::DIRT){
$block = $this->getLevel()->getBlock(new Vector3($x, $y, $z));
$block = Block::get($block, $this->getLevel()->getBlockDataAt($x, $y, $z), new Position($x, $y, $z, $this->getLevel()));
if($block->getSide(1) instanceof Transparent){
$this->getLevel()->setBlock($block, new Mycelium());
}