Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'

This commit is contained in:
Dylan K. Taylor
2020-04-18 17:33:05 +01:00
76 changed files with 286 additions and 238 deletions

View File

@ -78,7 +78,7 @@ class Leaves extends Transparent{
}
$visited[$index] = true;
$block = $this->pos->getWorld()->getBlock($pos);
$block = $this->pos->getWorldNonNull()->getBlock($pos);
if($block instanceof Wood){ //type doesn't matter
return true;
}
@ -97,7 +97,7 @@ class Leaves extends Transparent{
public function onNearbyBlockChange() : void{
if(!$this->noDecay and !$this->checkDecay){
$this->checkDecay = true;
$this->pos->getWorld()->setBlock($this->pos, $this, false);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this, false);
}
}
@ -111,9 +111,9 @@ class Leaves extends Transparent{
$ev->call();
if($ev->isCancelled() or $this->findLog($this->pos)){
$this->checkDecay = false;
$this->pos->getWorld()->setBlock($this->pos, $this, false);
$this->pos->getWorldNonNull()->setBlock($this->pos, $this, false);
}else{
$this->pos->getWorld()->useBreakOn($this->pos);
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
}
}
}