Kelp 5.46.0
Extends Flowable
Implements Ageable, Waterlogged
Kelp grows in columns inside water sources. Bedrock has a single block for the whole column (kelp_age); the client draws the top of the column differently on its own.
Vanilla (https://minecraft.wiki/w/Kelp): placed on top of a block with a full top face (not magma) or on kelp, gets a random age 0-24 when placed, and the top of a column grows one block with a 14% chance per random tick while its age is below 25 and the space above is a water source; the new block's age is one higher. Bone meal grows the column by one block. Kelp leaves its water behind when broken, and drops itself.
Constants
GROWTH_CHANCE
php
public const GROWTH_CHANCE = 14Chance (in %) that the top of a column grows on a random tick.
MAX_AGE
php
public const MAX_AGE = 25Methods
canBePlacedAt()
php
public function canBePlacedAt(\pocketmine\block\Block $blockReplace, \pocketmine\math\Vector3 $clickVector, int $face, bool $isClickedBlock) : boolgetCompostabilityChance()
php
public function getCompostabilityChance() : intonInteract()
php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : boolonNearbyBlockChange()
php
public function onNearbyBlockChange() : voidonRandomTick()
php
public function onRandomTick() : voidplace()
php
public function place(\pocketmine\world\BlockTransaction $tx, \pocketmine\item\Item $item, \pocketmine\block\Block $blockReplace, \pocketmine\block\Block $blockClicked, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null) : boolticksRandomly()
php
public function ticksRandomly() : bool