Skip to content

AlwaysWaterloggedTrait 5.46.0 ​

trait · pocketmine\block\utils\AlwaysWaterloggedTrait · source

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() : bool

getLightFilter() ​

php
public function getLightFilter() : int

hasEntityCollision() ​

php
public function hasEntityCollision() : bool

isWaterlogged() ​

php
public function isWaterlogged() : bool

onBreak() ​

php
public function onBreak(\pocketmine\item\Item $item, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onEntityInside() ​

php
public function onEntityInside(\pocketmine\entity\Entity $entity) : bool

onScheduledUpdate() ​

php
public function onScheduledUpdate() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.