mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3'
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user