Skip to content

FertilizeCropsGoal 5.47.0 ​

class · pocketmine\entity\ai\villager\FertilizeCropsGoal · source

Extends VillagerGoal

Farmers with bone meal use it on the growing crops around them during working hours (vanilla behavior.fertilize_farm_block, work_schedule_farmer priority 8, defaults: search_range 1, search_height 1, goal_radius 1.5, search_cooldown_max_seconds 8, speed 0.5, max_fertilizer_usage 1). One bone meal per search.

The search reads the 3x3x3 blocks around the farmer, at most once every 0-8 seconds; nothing runs for other villagers or outside working hours.

Constants ​

SEARCH_COOLDOWN_MAX ​

php
public const SEARCH_COOLDOWN_MAX = 160

Most ticks between two searches (search_cooldown_max_seconds).

SEARCH_HEIGHT ​

php
public const SEARCH_HEIGHT = 1

SEARCH_RANGE ​

php
public const SEARCH_RANGE = 1

SPEED ​

php
public const SPEED = 0.5

Methods ​

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

start() ​

php
public function start() : void

stop() ​

php
public function stop() : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP. Not affiliated with the PMMP team or Mojang.