Interface CreatureBehavior
- All Superinterfaces:
EntityBehavior
- All Known Subinterfaces:
AllayBehavior
,AxolotlBehavior
,BreezeBehavior
,CamelBehavior
,FrogBehavior
,PiglinBehavior
,VillagerBehavior
,WardenBehavior
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull BehaviorResult
Follows the Entity's Temptation (e.g.default @NotNull BehaviorResult
followTemptation
(float speedMod) Follows the Entity's Temptation (e.g.followTemptation
(@NotNull Function<LivingEntity, Float> speedModifier) Follows the Entity's Temptation (e.g.default @NotNull BehaviorResult
panic()
Makes this Creature panic with the default speed modifier.panic
(float speedMod) Makes this Creature panic.default @NotNull BehaviorResult
tryFindWater
(int range) Makes this Creature attempt to find water, with no speed modifier.tryFindWater
(int range, float speedMod) Makes this Creature attempt to find water.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
-
panic
Makes this Creature panic.This behavior only natively exists on 1.17+, meaning that on 1.17 and above,
EntityMemory.IS_PANICKING
needs to be registered, while on all versions,EntityMemory.LAST_HURT_ENTITY
needs to be present.- Parameters:
speedMod
- Speed Modifier while panicking- Returns:
- Result of Behavior
-
panic
Makes this Creature panic with the default speed modifier.This behavior only natively exists on 1.17+, meaning that on 1.17 and above,
EntityMemory.IS_PANICKING
needs to be registered, while on all versions,EntityMemory.LAST_HURT_ENTITY
needs to be present.- Returns:
- Result of Behavior
-
followTemptation
@NotNull @NotNull BehaviorResult followTemptation(@NotNull @NotNull Function<LivingEntity, Float> speedModifier) throws IllegalArgumentExceptionFollows the Entity's Temptation (e.g. target, tempting player).This behavior requires the following memories to be registered:
This behavior also requires
EntityMemory.TEMPTING_PLAYER
memories to be present in the brain.Finally, this behavior requires the following memories to be absent from the brain:
- Parameters:
speedModifier
- Function that returns speed modifier- Returns:
- Result of Behavior
- Throws:
IllegalArgumentException
- if speed modifier is null
-
followTemptation
Follows the Entity's Temptation (e.g. target, tempting player).This behavior requires the following memories to be registered:
This behavior also requires
EntityMemory.TEMPTING_PLAYER
memories to be present in the brain.Finally, this behavior requires the following memories to be absent from the brain:
- Parameters:
speedMod
- Speed Modifier while following- Returns:
- Result of Behavior
-
followTemptation
Follows the Entity's Temptation (e.g. target, tempting player), with no Speed Modifier.This behavior requires the following memories to be registered:
This behavior also requires
EntityMemory.TEMPTING_PLAYER
memories to be present in the brain.Finally, this behavior requires the following memories to be absent from the brain:
- Returns:
- Result of Behavior
-
tryFindWater
Makes this Creature attempt to find water.This behavior does not require any memories.
- Parameters:
range
- Radius of how far to lookspeedMod
- Speed Modifier while looking- Returns:
- Result of Behavior
-
tryFindWater
Makes this Creature attempt to find water, with no speed modifier.This behavior does not require any memories.
- Parameters:
range
- Radius of how far to look- Returns:
- Result of Behavior
-