Changed block construction calls to Block::get()

This commit is contained in:
Dylan K. Taylor
2017-08-19 13:46:17 +01:00
parent 276fccf4bb
commit 0e24596aed
22 changed files with 50 additions and 63 deletions

View File

@ -65,7 +65,7 @@ class Mycelium extends Solid{
$block = $this->getLevel()->getBlock(new Vector3($x, $y, $z));
if($block->getId() === Block::DIRT){
if($block->getSide(Vector3::SIDE_UP) instanceof Transparent){
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, new Mycelium()));
Server::getInstance()->getPluginManager()->callEvent($ev = new BlockSpreadEvent($block, $this, Block::get(Block::MYCELIUM)));
if(!$ev->isCancelled()){
$this->getLevel()->setBlock($block, $ev->getNewState());
}