AlwaysWaterloggedTrait 5.46.0
For Waterlogged blocks that only exist inside a water source (kelp, seagrass). Classes using this must call WaterloggedHelper::scheduleFlow() from onNearbyBlockChange() so that the water spreads into empty neighbours.
Methods
canBeFlowedInto()
php
public function canBeFlowedInto() : boolgetLightFilter()
php
public function getLightFilter() : inthasEntityCollision()
php
public function hasEntityCollision() : boolisWaterlogged()
php
public function isWaterlogged() : boolonBreak()
php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonEntityInside()
php
public function onEntityInside(\pocketmine\entity\Entity $entity) : boolonScheduledUpdate()
php
public function onScheduledUpdate() : void