color = DyeColor::WHITE(); parent::__construct($idInfo, $name, $breakInfo); } public function onNearbyBlockChange() : void{ if(($block = $this->checkAdjacentWater()) !== null){ $ev = new BlockFormEvent($this, $block); $ev->call(); if(!$ev->isCancelled()){ $this->position->getWorld()->setBlock($this->position, $ev->getNewState()); } }else{ $this->startFalling(); } } public function tickFalling() : ?Block{ return $this->checkAdjacentWater(); } private function checkAdjacentWater() : ?Block{ foreach(Facing::ALL as $i){ if($i === Facing::DOWN){ continue; } if($this->getSide($i) instanceof Water){ return VanillaBlocks::CONCRETE()->setColor($this->color); } } return null; } }