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

@ -43,7 +43,7 @@ class Ice extends Transparent{
public function onBreak(Item $item, ?Player $player = null) : bool{
if(($player === null or $player->isSurvival()) and !$item->hasEnchantment(Enchantment::SILK_TOUCH())){
$this->pos->getWorld()->setBlock($this->pos, VanillaBlocks::WATER());
$this->pos->getWorldNonNull()->setBlock($this->pos, VanillaBlocks::WATER());
return true;
}
return parent::onBreak($item, $player);
@ -54,8 +54,8 @@ class Ice extends Transparent{
}
public function onRandomTick() : void{
if($this->pos->getWorld()->getHighestAdjacentBlockLight($this->pos->x, $this->pos->y, $this->pos->z) >= 12){
$this->pos->getWorld()->useBreakOn($this->pos);
if($this->pos->getWorldNonNull()->getHighestAdjacentBlockLight($this->pos->x, $this->pos->y, $this->pos->z) >= 12){
$this->pos->getWorldNonNull()->useBreakOn($this->pos);
}
}