Merge branch '3.5'

This commit is contained in:
Dylan K. Taylor 2019-01-05 09:27:16 +00:00
commit d83f024a1f

View File

@ -56,7 +56,7 @@ class Ice extends Transparent{
}
public function onBreak(Item $item, Player $player = null) : bool{
if(!$item->hasEnchantment(Enchantment::SILK_TOUCH)){
if(($player === null or $player->isSurvival()) and !$item->hasEnchantment(Enchantment::SILK_TOUCH)){
return $this->getLevel()->setBlock($this, BlockFactory::get(Block::WATER));
}
return parent::onBreak($item, $player);