Class StayCloseToTarget<E extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.StayCloseToTarget<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final float
private final Function<LivingEntity,
Optional<PositionTracker>> private final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionStayCloseToTarget
(Function<LivingEntity, Optional<PositionTracker>> p_217386_, int p_217387_, int p_217388_, float p_217389_) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkExtraStartConditions
(ServerLevel p_217391_, E p_217392_) protected void
start
(ServerLevel p_217394_, E p_217395_, long p_217396_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
targetPositionGetter
-
closeEnough
private final int closeEnough -
tooFar
private final int tooFar -
speedModifier
private final float speedModifier
-
-
Constructor Details
-
StayCloseToTarget
public StayCloseToTarget(Function<LivingEntity, Optional<PositionTracker>> p_217386_, int p_217387_, int p_217388_, float p_217389_)
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends LivingEntity>
-
start
- Overrides:
start
in classBehavior<E extends LivingEntity>
-