Skip to content

Kelp 5.46.0 ​

class · pocketmine\block\Kelp · source

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 = 14

Chance (in %) that the top of a column grows on a random tick.

MAX_AGE ​

php
public const MAX_AGE = 25

Methods ​

canBePlacedAt() ​

php
public function canBePlacedAt(\pocketmine\block\Block $blockReplace, \pocketmine\math\Vector3 $clickVector, int $face, bool $isClickedBlock) : bool

getCompostabilityChance() ​

php
public function getCompostabilityChance() : int

onInteract() ​

php
public function onInteract(\pocketmine\item\Item $item, int $face, \pocketmine\math\Vector3 $clickVector, ?\pocketmine\player\Player $player = null, array &$returnedItems = []) : bool

onNearbyBlockChange() ​

php
public function onNearbyBlockChange() : void

onRandomTick() ​

php
public function onRandomTick() : void

place() ​

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

ticksRandomly() ​

php
public function ticksRandomly() : bool

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