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
FieldsModifier 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
ConstructorsConstructorDescriptionFollowTemptation
(Function<LivingEntity, Float> speedModifier) FollowTemptation
(Function<LivingEntity, Float> speedModifier, Function<LivingEntity, Double> closeEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel level, PathfinderMob entity, long gameTime) protected float
getSpeedModifier
(PathfinderMob pathfinder) getTemptingPlayer
(PathfinderMob pathfinder) protected void
start
(ServerLevel level, PathfinderMob entity, long gameTime) protected void
stop
(ServerLevel level, PathfinderMob entity, long gameTime) protected void
tick
(ServerLevel level, PathfinderMob owner, long gameTime) protected boolean
timedOut
(long gameTime) 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> speedModifier, Function<LivingEntity, Double> closeEnoughDistance)
-
-
Method Details
-
getSpeedModifier
-
getTemptingPlayer
-
timedOut
protected boolean timedOut(long gameTime) - 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>
-