ExploreOutskirtsGoal 5.47.0
Extends VillagerGoal
During wander time villagers walk to the outskirts of their village and look around there (vanilla behavior.explore_outskirts in wander_schedule_villager: priority 9, speed 0.6, explore_dist 6, max_wait_time 10 s, min_dist_from_target 2.5; defaults max_travel_time 60 s, next_xz 5, next_y 3, timer_ratio 2).
The village edge is the dwelling radius around the villager's bed (see \pocketmine\entity\npc\VillagerV2::getHomeRadius()): the villager heads for a random point within 6 blocks inside it, in legs of RaidMoveGoal::STEP blocks, then explores spots up to 5 blocks around, waiting up to 10 seconds at each, for twice the time the trip took. Villagers without a bed don't explore. A leg the villager can't walk (no path, or a partial one that leaves it where it was: pens, iron farms, walled villages) ends the trip, like a failed path ends vanilla goals; the next exploration then waits ExploreOutskirtsGoal::COOLDOWN_MAX ticks, twice as long after two failed ones in a row and four times after three or more, so that villagers which can't leave their pen don't keep searching paths out of it.
Constants
EXPLORE_DISTANCE
public const EXPLORE_DISTANCE = 6SPEED
public const SPEED = 0.6Methods
canContinue()
public function canContinue() : boolcanStart()
public function canStart() : boolgetFlags()
public function getFlags() : intstart()
public function start() : voidstop()
public function stop() : voidtick()
public function tick() : void