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 doubleprivate final Function<LivingEntity, Double> static final doubleprivate final booleanprivate final Function<LivingEntity, Float> static final intFields 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) FollowTemptation(Function<LivingEntity, Float> speedModifier, Function<LivingEntity, Double> closeEnoughDistance, boolean lookInTheEyes) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, PathfinderMob entity, long gameTime) protected floatgetSpeedModifier(PathfinderMob pathfinder) getTemptingPlayer(PathfinderMob pathfinder) protected voidstart(ServerLevel level, PathfinderMob entity, long gameTime) protected voidstop(ServerLevel level, PathfinderMob entity, long gameTime) protected voidtick(ServerLevel level, PathfinderMob owner, long gameTime) protected booleantimedOut(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
-
lookInTheEyes
private final boolean lookInTheEyes
-
-
Constructor Details
-
FollowTemptation
-
FollowTemptation
public FollowTemptation(Function<LivingEntity, Float> speedModifier, Function<LivingEntity, Double> closeEnoughDistance) -
FollowTemptation
public FollowTemptation(Function<LivingEntity, Float> speedModifier, Function<LivingEntity, Double> closeEnoughDistance, boolean lookInTheEyes)
-
-
Method Details
-
getSpeedModifier
-
getTemptingPlayer
-
timedOut
protected boolean timedOut(long gameTime) - Overrides:
timedOutin classBehavior<PathfinderMob>
-
canStillUse
- Overrides:
canStillUsein classBehavior<PathfinderMob>
-
start
- Overrides:
startin classBehavior<PathfinderMob>
-
stop
- Overrides:
stopin classBehavior<PathfinderMob>
-
tick
- Overrides:
tickin classBehavior<PathfinderMob>
-