isSurvival()) && !$item->hasEnchantment(VanillaEnchantments::SILK_TOUCH())){ $this->position->getWorld()->setBlock($this->position, VanillaBlocks::WATER()); return true; } return parent::onBreak($item, $player); } public function ticksRandomly() : bool{ return true; } public function onRandomTick() : void{ $world = $this->position->getWorld(); if($world->getHighestAdjacentBlockLight($this->position->x, $this->position->y, $this->position->z) >= 12){ $ev = new BlockMeltEvent($this, VanillaBlocks::WATER()); $ev->call(); if(!$ev->isCancelled()){ $world->setBlock($this->position, $ev->getNewState()); } } } public function getDropsForCompatibleTool(Item $item) : array{ return []; } public function isAffectedBySilkTouch() : bool{ return true; } }