Class SetWalkTargetAwayFrom<T>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<PathfinderMob>
net.minecraft.world.entity.ai.behavior.SetWalkTargetAwayFrom<T>
-
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 MemoryModuleType<T>
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
entryCondition
-
Constructor Summary
ConstructorDescriptionSetWalkTargetAwayFrom
(MemoryModuleType<T> p_23987_, float p_23988_, int p_23989_, boolean p_23990_, Function<T, Vec3> p_23991_) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
protected boolean
checkExtraStartConditions
(ServerLevel p_24000_, PathfinderMob p_24001_) static SetWalkTargetAwayFrom<? extends Entity>
entity
(MemoryModuleType<? extends Entity> p_24020_, float p_24021_, int p_24022_, boolean p_24023_) private Vec3
getPosToAvoid
(PathfinderMob p_24007_) private static void
moveAwayFrom
(PathfinderMob p_24009_, Vec3 p_24010_, float p_24011_) static SetWalkTargetAwayFrom<BlockPos>
pos
(MemoryModuleType<BlockPos> p_24013_, float p_24014_, int p_24015_, boolean p_24016_) protected void
start
(ServerLevel p_24003_, PathfinderMob p_24004_, long p_24005_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
walkAwayFromMemory
-
speedModifier
private final float speedModifier -
desiredDistance
private final int desiredDistance -
toPosition
-
-
Constructor Details
-
SetWalkTargetAwayFrom
public SetWalkTargetAwayFrom(MemoryModuleType<T> p_23987_, float p_23988_, int p_23989_, boolean p_23990_, Function<T, Vec3> p_23991_)
-
-
Method Details
-
pos
public static SetWalkTargetAwayFrom<BlockPos> pos(MemoryModuleType<BlockPos> p_24013_, float p_24014_, int p_24015_, boolean p_24016_) -
entity
public static SetWalkTargetAwayFrom<? extends Entity> entity(MemoryModuleType<? extends Entity> p_24020_, float p_24021_, int p_24022_, boolean p_24023_) -
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<PathfinderMob>
-
getPosToAvoid
-
alreadyWalkingAwayFromPosWithSameSpeed
-
start
- Overrides:
start
in classBehavior<PathfinderMob>
-
moveAwayFrom
-