Interface PiglinBehavior
- All Superinterfaces:
CreatureBehavior
,EntityBehavior
Represents Behavior for a Bukkit Piglin
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Resets the hunting radius used instartHunting()
to its default value (100).void
setHuntingRadius
(int radius) Sets the hunting radius used to look for a new Hoglin instartHunting()
.startAdmiring
(@Nullable Item want, int duration) Makes this Piglin start admiring if a wanted item is near.Makes this Piglin start hunting if a Hoglin is near.Makes this Piglin stop admiring an item if it is admiring an item.Makes this Piglin stop hunting for Piglins.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
-
stopHunting
Makes this Piglin stop hunting for Piglins.This behavior requires
EntityMemory.HAS_HUNTED_RECENTLY
to be registered, andEntityMemory.ATTACK_TARGET
to be present.- Returns:
- Result of Behavior
-
startAdmiring
Makes this Piglin start admiring if a wanted item is near.This method will set
EntityMemory.IS_ADMIRING_ITEM
andEntityMemory.NEAREST_WANTED_ITEM
for you with the provided arguments.This behavior requires
EntityMemory.ADMIRING_DISABLED
andEntityMemory.IS_ADMIRING_ITEM
to be absent previously.- Parameters:
want
- Item Entity to admireduration
- How long to admire the item- Returns:
- Result of Behavior
-
startHunting
Makes this Piglin start hunting if a Hoglin is near.- Returns:
- Result of Behavior
-
setHuntingRadius
Sets the hunting radius used to look for a new Hoglin instartHunting()
.- Parameters:
radius
- Radius to look for a Hoglin- Throws:
IllegalArgumentException
- if radius is not positive
-
resetHuntingRadius
default void resetHuntingRadius()Resets the hunting radius used instartHunting()
to its default value (100). -
stopAdmiring
Makes this Piglin stop admiring an item if it is admiring an item.This method removes
EntityMemory.IS_ADMIRING_ITEM
for you.- Returns:
- Result of Behavior
-