mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 09:39:56 +00:00
Fixed mycelium spreading onto coarse dirt (#4816)
This commit is contained in:
parent
91f81d4c8e
commit
6a39caa204
@ -50,7 +50,7 @@ class Mycelium extends Opaque{
|
|||||||
$y = mt_rand($this->position->y - 2, $this->position->y + 2);
|
$y = mt_rand($this->position->y - 2, $this->position->y + 2);
|
||||||
$z = mt_rand($this->position->z - 1, $this->position->z + 1);
|
$z = mt_rand($this->position->z - 1, $this->position->z + 1);
|
||||||
$block = $this->position->getWorld()->getBlockAt($x, $y, $z);
|
$block = $this->position->getWorld()->getBlockAt($x, $y, $z);
|
||||||
if($block->getId() === BlockLegacyIds::DIRT){
|
if($block instanceof Dirt && !$block->isCoarse()){
|
||||||
if($block->getSide(Facing::UP) instanceof Transparent){
|
if($block->getSide(Facing::UP) instanceof Transparent){
|
||||||
$ev = new BlockSpreadEvent($block, $this, VanillaBlocks::MYCELIUM());
|
$ev = new BlockSpreadEvent($block, $this, VanillaBlocks::MYCELIUM());
|
||||||
$ev->call();
|
$ev->call();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user