net.minecraft.entity.ai.brain.task

public class FleeTask<E extends PathAwareEntity>

extends MultiTickTask<E>

All mapped superinterfaces:

Task

net.minecraft.world.entity.ai.behavior.AnimalPanic
net.minecraft.world.entity.ai.behavior.AnimalPanic
net.minecraft.class_6028
net.minecraft.entity.ai.brain.task.FleeTask

Field summary

Modifier and TypeField
private static final int
PANIC_MIN_DURATION
PANIC_MIN_DURATION
field_30107
MIN_RUN_TIME
private static final int
PANIC_MAX_DURATION
PANIC_MAX_DURATION
field_30108
MAX_RUN_TIME
private static final int
PANIC_DISTANCE_HORIZONTAL
PANIC_DISTANCE_HORIZONTAL
field_30109
HORIZONTAL_RANGE
private static final int
PANIC_DISTANCE_VERTICAL
PANIC_DISTANCE_VERTICAL
field_30110
VERTICAL_RANGE
private final float
speedMultiplier
speedMultiplier
field_30111
speed
private final Function<PathAwareEntity, TagKey<DamageType>>
panicCausingDamageTypes
panicCausingDamageTypes
field_52010
entityToDangerousDamageTypes
private final Function<E, Vec3d>
positionGetter
positionGetter
field_59675
pathFinder

Constructor summary

ModifierConstructor
public (float speed)
public (float speed, int startHeight)
public (float speed, Function<PathAwareEntity, TagKey<DamageType>> entityToDangerousDamageTypes)
public (float speed, Function<PathAwareEntity, TagKey<DamageType>> entityToDangerousDamageTypes, Function<E, Vec3d> pathFinder)

Method summary

Modifier and TypeMethod
protected boolean
checkExtraStartConditions(ServerLevel level, E body)
checkExtraStartConditions(ServerLevel level, E body)
method_49487(class_3218 arg0, E arg1)
shouldRun(ServerWorld arg0, E arg1)
protected boolean
canStillUse(ServerLevel level, E body, long timestamp)
canStillUse(ServerLevel level, E body, long timestamp)
method_35063(class_3218 arg0, E arg1, long arg2)
shouldKeepRunning(ServerWorld arg0, E arg1, long arg2)
protected void
start(ServerLevel level, E body, long timestamp)
start(ServerLevel level, E body, long timestamp)
method_35064(class_3218 arg0, E arg1, long arg2)
run(ServerWorld arg0, E arg1, long arg2)
protected void
stop(ServerLevel level, E body, long timestamp)
stop(ServerLevel level, E body, long timestamp)
method_44203(class_3218 arg0, E arg1, long arg2)
finishRunning(ServerWorld arg0, E arg1, long arg2)
protected void
tick(ServerLevel level, E body, long timestamp)
tick(ServerLevel level, E body, long timestamp)
method_35065(class_3218 arg0, E arg1, long arg2)
keepRunning(ServerWorld arg0, E arg1, long arg2)
private Vec3d
getPanicPos(E body, ServerLevel level)
getPanicPos(E body, ServerLevel level)
method_39761(E arg0, class_3218 arg1)
findTarget(E entity, ServerWorld world)
private Optional<BlockPos>
lookForWater(LevelReader level, Entity mob)
lookForWater(LevelReader level, Entity mob)
method_39762(class_4538 arg0, class_1297 arg1)
findClosestWater(WorldView world, Entity entity)
private static boolean
isWater(BlockState state)
isWater(BlockState state)
method_1_8766(class_2680 arg0)
isWater(BlockState state)