Class RunAwayTask<T>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<CreatureEntity>
net.minecraft.entity.ai.brain.task.RunAwayTask<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final float
private final MemoryModuleType<T>
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
Constructor Summary
ConstructorDescriptionRunAwayTask
(MemoryModuleType<T> p_i231533_1_, float p_i231533_2_, int p_i231533_3_, boolean p_i231533_4_, Function<T, Vector3d> p_i231533_5_) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
alreadyWalkingAwayFromPosWithSameSpeed
(CreatureEntity p_233964_1_) protected boolean
checkExtraStartConditions
(ServerWorld p_212832_1_, CreatureEntity p_212832_2_) static RunAwayTask<? extends Entity>
entity
(MemoryModuleType<? extends Entity> p_233965_0_, float p_233965_1_, int p_233965_2_, boolean p_233965_3_) private Vector3d
getPosToAvoid
(CreatureEntity p_233961_1_) private static void
moveAwayFrom
(CreatureEntity p_233962_0_, Vector3d p_233962_1_, float p_233962_2_) static RunAwayTask<BlockPos>
pos
(MemoryModuleType<BlockPos> p_233963_0_, float p_233963_1_, int p_233963_2_, boolean p_233963_3_) protected void
start
(ServerWorld p_212831_1_, CreatureEntity p_212831_2_, long p_212831_3_) Methods inherited from class net.minecraft.entity.ai.brain.task.Task
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
-
RunAwayTask
public RunAwayTask(MemoryModuleType<T> p_i231533_1_, float p_i231533_2_, int p_i231533_3_, boolean p_i231533_4_, Function<T, Vector3d> p_i231533_5_)
-
-
Method Details
-
pos
public static RunAwayTask<BlockPos> pos(MemoryModuleType<BlockPos> p_233963_0_, float p_233963_1_, int p_233963_2_, boolean p_233963_3_) -
entity
public static RunAwayTask<? extends Entity> entity(MemoryModuleType<? extends Entity> p_233965_0_, float p_233965_1_, int p_233965_2_, boolean p_233965_3_) -
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classTask<CreatureEntity>
-
getPosToAvoid
-
alreadyWalkingAwayFromPosWithSameSpeed
-
start
- Overrides:
start
in classTask<CreatureEntity>
-
moveAwayFrom
private static void moveAwayFrom(CreatureEntity p_233962_0_, Vector3d p_233962_1_, float p_233962_2_)
-