Class FollowTemptation
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<PathfinderMob>
net.minecraft.world.entity.ai.behavior.FollowTemptation
- All Implemented Interfaces:
BehaviorControl<PathfinderMob>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
private final Function
<LivingEntity, Double> static final double
private final Function
<LivingEntity, Float> static final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionFollowTemptation
(Function<LivingEntity, Float> p_147486_) FollowTemptation
(Function<LivingEntity, Float> p_288997_, Function<LivingEntity, Double> p_288972_) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel p_147494_, PathfinderMob p_147495_, long p_147496_) protected float
getSpeedModifier
(PathfinderMob p_147498_) getTemptingPlayer
(PathfinderMob p_147509_) protected void
start
(ServerLevel p_147505_, PathfinderMob p_147506_, long p_147507_) protected void
stop
(ServerLevel p_147515_, PathfinderMob p_147516_, long p_147517_) protected void
tick
(ServerLevel p_147523_, PathfinderMob p_147524_, long p_147525_) protected boolean
timedOut
(long p_147488_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
checkExtraStartConditions, debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, tryStart
-
Field Details
-
TEMPTATION_COOLDOWN
public static final int TEMPTATION_COOLDOWN- See Also:
-
DEFAULT_CLOSE_ENOUGH_DIST
public static final double DEFAULT_CLOSE_ENOUGH_DIST- See Also:
-
BACKED_UP_CLOSE_ENOUGH_DIST
public static final double BACKED_UP_CLOSE_ENOUGH_DIST- See Also:
-
speedModifier
-
closeEnoughDistance
-
-
Constructor Details
-
FollowTemptation
-
FollowTemptation
public FollowTemptation(Function<LivingEntity, Float> p_288997_, Function<LivingEntity, Double> p_288972_)
-
-
Method Details
-
getSpeedModifier
-
getTemptingPlayer
-
timedOut
protected boolean timedOut(long p_147488_) - Overrides:
timedOut
in classBehavior<PathfinderMob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<PathfinderMob>
-
start
- Overrides:
start
in classBehavior<PathfinderMob>
-
stop
- Overrides:
stop
in classBehavior<PathfinderMob>
-
tick
- Overrides:
tick
in classBehavior<PathfinderMob>
-