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> pSpeedModifier) FollowTemptation
(Function<LivingEntity, Float> pSpeedModifier, Function<LivingEntity, Double> pCloseEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected float
getSpeedModifier
(PathfinderMob pPathfinder) getTemptingPlayer
(PathfinderMob pPathfinder) protected void
start
(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected void
stop
(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected void
tick
(ServerLevel pLevel, PathfinderMob pOwner, long pGameTime) protected boolean
timedOut
(long pGameTime) 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> pSpeedModifier, Function<LivingEntity, Double> pCloseEnoughDistance)
-
-
Method Details
-
getSpeedModifier
-
getTemptingPlayer
-
timedOut
protected boolean timedOut(long pGameTime) - 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>
-