Interface VillagerBehavior
- All Superinterfaces:
CreatureBehavior
,EntityBehavior
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull BehaviorResult
celebrateSurvivedRaid
(int duration) Makes this Villager celebrate that they survived the Raid.celebrateSurvivedRaid
(int minDuration, int maxDuration) Makes this Villager celebrate that they survived the Raid.default BehaviorResult
Makes this Villager find a potential Job Site with the default Speed Modifier.findJobSite
(float speedMod) Makes this Villager find a potential Job Site.default @NotNull BehaviorResult
findNearestVillage
(int minDistance) Makes this Villager find the nearest Village, with no speed modifier.findNearestVillage
(int minDistance, float speedMod) Makes this Villager find the nearest Village.giftHero
(int duration) Makes this Villager gift the hero of the Raid.Makes this Villager harvest Farmland.Resets this Villager's profession.default @NotNull BehaviorResult
showTrades
(int duration) Makes this Village show trades to a Player.showTrades
(int minDuration, int maxDuration) Makes this Villager show trades to a Player.Makes this Villager use bonemeal.Makes this Villager work at its Job Site.Methods inherited from interface me.gamercoder215.mobchip.ai.behavior.CreatureBehavior
followTemptation, followTemptation, followTemptation, panic, panic, tryFindWater, tryFindWater
Methods inherited from interface me.gamercoder215.mobchip.ai.behavior.EntityBehavior
backupIfClose, backupIfClose, eraseIf, interactWithDoor, jumpOnBed, jumpOnBed, meleeAttack, meleeAttack, moveToWantedItem, moveToWantedItem, moveToWantedItem, passiveIf, reactToBell, ringBell, sleep, socializeAtBell, wakeUp
-
Method Details
-
harvestFarmland
Makes this Villager harvest Farmland.This behavior requires
EntityMemory.LOOKING_TARGET
andEntityMemory.WALKING_TARGET
to be absent, andEntityMemory.SECONDARY_JOB_SITE
to be present.- Returns:
- Result of Behavior
-
showTrades
Makes this Villager show trades to a Player.This behavior requires
EntityMemory.INTERACTION_TARGET
to be present.- Parameters:
minDuration
- Minimum Duration, in ticks, of showingmaxDuration
- Maximum Duration, in ticks, of showing- Returns:
- Result of Behavior
-
showTrades
Makes this Village show trades to a Player.This behavior requires
EntityMemory.INTERACTION_TARGET
to be present.- Parameters:
duration
- How long to show trades, in ticks- Returns:
- Result of Behavior
-
resetProfession
Resets this Villager's profession.This method removes
EntityMemory.JOB_SITE
for you.- Returns:
- Result of Behavior
-
giftHero
Makes this Villager gift the hero of the Raid.This behavior requires the follow memories to be registered:
This behavior also requires
EntityMemory.NEAREST_VISIBLE_PLAYER
to be present.- Parameters:
duration
- Duration, in ticks, of gifting- Returns:
- Result of Behavior
-
celebrateSurvivedRaid
Makes this Villager celebrate that they survived the Raid.This behavior does not require any memories.
- Parameters:
minDuration
- Minimum Duration, in ticks, of celebratingmaxDuration
- Maximum Duration, in ticks, of celebrating- Returns:
- Result of Behavior
-
celebrateSurvivedRaid
Makes this Villager celebrate that they survived the Raid.This behavior does not require any memories.
- Parameters:
duration
- Duration, in ticks, of celebrating- Returns:
- Result of Behavior
-
findJobSite
Makes this Villager find a potential Job Site.This behavior requires
EntityMemory.JOB_SITE
to be present.- Parameters:
speedMod
- Speed Modifier while looking- Returns:
- Result of Behavior
-
findJobSite
Makes this Villager find a potential Job Site with the default Speed Modifier.This behavior requires
EntityMemory.JOB_SITE
to be present.- Returns:
- Result of Behavior
-
findNearestVillage
Makes this Villager find the nearest Village.This method removes
EntityMemory.WALKING_TARGET
for you.- Parameters:
minDistance
- Minimum Distance from VillagespeedMod
- Speed Modifier while looking- Returns:
- Result of Behavior
-
findNearestVillage
Makes this Villager find the nearest Village, with no speed modifier.This method removes
EntityMemory.WALKING_TARGET
for you.- Parameters:
minDistance
- Minimum Distance from Village- Returns:
- Result of Behavior
-
workAtJob
Makes this Villager work at its Job Site.This behavior requires
EntityMemory.JOB_SITE
to be present andEntityMemory.LOOKING_TARGET
to be registered.- Returns:
- Result of Behavior
-
useBonemeal
Makes this Villager use bonemeal.This method removes
EntityMemory.LOOKING_TARGET
andEntityMemory.WALKING_TARGET
for you.- Returns:
- Result of Behavior
-