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 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> pSpeedModifier) FollowTemptation(Function<LivingEntity, Float> pSpeedModifier, Function<LivingEntity, Double> pCloseEnoughDistance) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected floatgetSpeedModifier(PathfinderMob pPathfinder) getTemptingPlayer(PathfinderMob pPathfinder) protected voidstart(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected voidstop(ServerLevel pLevel, PathfinderMob pEntity, long pGameTime) protected voidtick(ServerLevel pLevel, PathfinderMob pOwner, long pGameTime) protected booleantimedOut(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:
timedOutin classBehavior<PathfinderMob>
-
canStillUse
- Overrides:
canStillUsein classBehavior<PathfinderMob>
-
start
- Overrides:
startin classBehavior<PathfinderMob>
-
stop
- Overrides:
stopin classBehavior<PathfinderMob>
-
tick
- Overrides:
tickin classBehavior<PathfinderMob>
-