Skip to content

CropGrowthHelper ​

final class · pocketmine\block\utils\CropGrowthHelper · source

Methods ​

calculateMultiplier() ​

php
public static function calculateMultiplier(\pocketmine\block\Block $block) : float

Returns the speed at which this crop will grow, depending on its surroundings. The default is once every 26 random ticks.

Things which influence this include nearby farmland (bonus for hydrated farmland) and the position of other nearby crops of the same type (nearby crops of the same type will negatively influence growth speed unless planted in rows and properly spaced apart).

canGrow() ​

php
public static function canGrow(\pocketmine\block\Block $block) : bool

hasEnoughLight() ​

php
public static function hasEnoughLight(\pocketmine\block\Block $block, int $minLevel = self::MIN_LIGHT_LEVEL) : bool

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