meta = $meta; } public function getName() : string{ return "Water"; } public function getLightFilter() : int{ return 2; } public function getStillForm() : Block{ return BlockFactory::get(Block::STILL_WATER, $this->meta); } public function getFlowingForm() : Block{ return BlockFactory::get(Block::FLOWING_WATER, $this->meta); } public function getBucketFillSound() : int{ return LevelSoundEventPacket::SOUND_BUCKET_FILL_WATER; } public function getBucketEmptySound() : int{ return LevelSoundEventPacket::SOUND_BUCKET_EMPTY_WATER; } public function tickRate() : int{ return 5; } public function onEntityCollide(Entity $entity) : void{ $entity->resetFallDistance(); if($entity->isOnFire()){ $entity->extinguish(); } $entity->resetFallDistance(); } public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{ $ret = $this->getLevel()->setBlock($this, $this, true, false); $this->getLevel()->scheduleDelayedBlockUpdate($this, $this->tickRate()); return $ret; } }