net.minecraft.entity.ai.pathing

public abstract class EntityNavigation

net.minecraft.world.entity.ai.navigation.PathNavigation
net.minecraft.world.entity.ai.navigation.PathNavigation
net.minecraft.class_1408
net.minecraft.entity.ai.pathing.EntityNavigation

Field summary

Modifier and TypeField
private static final int
MAX_TIME_RECOMPUTE
MAX_TIME_RECOMPUTE
field_30247
RECALCULATE_COOLDOWN
private static final int
STUCK_CHECK_INTERVAL
STUCK_CHECK_INTERVAL
field_41545
field_41545
private static final float
STUCK_THRESHOLD_DISTANCE_FACTOR
STUCK_THRESHOLD_DISTANCE_FACTOR
field_41546
field_41546
protected final MobEntity
mob
mob
field_6684
entity
protected final World
level
level
field_6677
world
protected Path
path
path
field_6681
currentPath
protected double
speedModifier
speedModifier
field_6668
speed
protected int
tick
tick
field_6675
tickCount
protected int
lastStuckCheck
lastStuckCheck
field_6674
pathStartTime
protected Vec3d
lastStuckCheckPos
lastStuckCheckPos
field_6672
pathStartPos
protected Vec3i
timeoutCachedNode
timeoutCachedNode
field_6680
lastNodePosition
protected long
timeoutTimer
timeoutTimer
field_6670
currentNodeMs
protected long
lastTimeoutCheck
lastTimeoutCheck
field_6669
lastActiveTickMs
protected double
timeoutLimit
timeoutLimit
field_6682
currentNodeTimeout
protected float
maxDistanceToWaypoint
maxDistanceToWaypoint
field_6683
nodeReachProximity
protected boolean
hasDelayedRecomputation
hasDelayedRecomputation
field_6679
inRecalculationCooldown
protected long
timeLastRecompute
timeLastRecompute
field_6685
lastRecalculateTime
protected PathNodeMaker
nodeEvaluator
nodeEvaluator
field_6678
nodeMaker
private BlockPos
targetPos
targetPos
field_20293
currentTarget
private int
reachRange
reachRange
field_20294
currentDistance
private float
maxVisitedNodesMultiplier
maxVisitedNodesMultiplier
field_21642
rangeMultiplier
private final PathNodeNavigator
pathFinder
pathFinder
field_6673
pathNodeNavigator
private boolean
isStuck
isStuck
field_26820
nearPathStartPos
private float
requiredPathLength
requiredPathLength
field_52451
maxFollowRange

Constructor summary

ModifierConstructor
public (MobEntity entity, World world)

Method summary

Modifier and TypeMethod
public void
updatePathfinderMaxVisitedNodes()
updatePathfinderMaxVisitedNodes()
method_61441()
updateRange()
public void
setRequiredPathLength(float length)
setRequiredPathLength(float length)
method_61439(float arg0)
setMaxFollowRange(float maxFollowRange)
private float
getMaxPathLength()
getMaxPathLength()
method_61440()
getMaxFollowRange()
public void
resetMaxVisitedNodesMultiplier()
resetMaxVisitedNodesMultiplier()
method_23965()
resetRangeMultiplier()
public void
setMaxVisitedNodesMultiplier(float maxVisitedNodesMultiplier)
setMaxVisitedNodesMultiplier(float maxVisitedNodesMultiplier)
method_23964(float arg0)
setRangeMultiplier(float rangeMultiplier)
public BlockPos
getTargetPos()
getTargetPos()
method_6355()
getTargetPos()
protected abstract PathNodeNavigator
createPathFinder(int maxVisitedNodes)
createPathFinder(int maxVisitedNodes)
method_6336(int arg0)
createPathNodeNavigator(int range)
public void
setSpeedModifier(double speedModifier)
setSpeedModifier(double speedModifier)
method_6344(double arg0)
setSpeed(double speed)
public void
recomputePath()
recomputePath()
method_6356()
recalculatePath()
public final Path
createPath(double x, double y, double z, int reachRange)
createPath(double x, double y, double z, int reachRange)
method_6352(double arg0, double arg1, double arg2, int arg3)
findPathTo(double x, double y, double z, int distance)
public Path
createPath(Stream<BlockPos> positions, int reachRange)
createPath(Stream<BlockPos> positions, int reachRange)
method_21643(Stream<class_2338> arg0, int arg1)
findPathToAny(Stream<BlockPos> positions, int distance)
public Path
createPath(Set<BlockPos> positions, int reachRange)
createPath(Set<BlockPos> positions, int reachRange)
method_29934(Set<class_2338> arg0, int arg1)
findPathTo(Set<BlockPos> positions, int distance)
public Path
createPath(BlockPos pos, int reachRange)
createPath(BlockPos pos, int reachRange)
method_6348(class_2338 arg0, int arg1)
findPathTo(BlockPos target, int distance)
public Path
createPath(BlockPos pos, int reachRange, int maxPathLength)
createPath(BlockPos pos, int reachRange, int maxPathLength)
method_35141(class_2338 arg0, int arg1, int arg2)
findPathTo(BlockPos target, int minDistance, int maxDistance)
public Path
createPath(Entity target, int reachRange)
createPath(Entity target, int reachRange)
method_6349(class_1297 arg0, int arg1)
findPathTo(Entity entity, int distance)
protected Path
createPath(Set<BlockPos> targets, int radiusOffset, boolean above, int reachRange)
createPath(Set<BlockPos> targets, int radiusOffset, boolean above, int reachRange)
method_35142(Set<class_2338> arg0, int arg1, boolean arg2, int arg3)
findPathTo(Set<BlockPos> positions, int range, boolean useHeadPos, int distance)
protected Path
createPath(Set<BlockPos> targets, int radiusOffset, boolean above, int reachRange, float maxPathLength)
createPath(Set<BlockPos> targets, int radiusOffset, boolean above, int reachRange, float maxPathLength)
method_18416(Set<class_2338> arg0, int arg1, boolean arg2, int arg3, float arg4)
findPathToAny(Set<BlockPos> positions, int range, boolean useHeadPos, int distance, float followRange)
public boolean
moveTo(double x, double y, double z, double speedModifier)
moveTo(double x, double y, double z, double speedModifier)
method_6337(double arg0, double arg1, double arg2, double arg3)
startMovingTo(double x, double y, double z, double speed)
public boolean
moveTo(double x, double y, double z, int reachRange, double speedModifier)
moveTo(double x, double y, double z, int reachRange, double speedModifier)
method_58160(double arg0, double arg1, double arg2, int arg3, double arg4)
startMovingTo(double x, double y, double z, int distance, double speed)
public boolean
moveTo(Entity target, double speedModifier)
moveTo(Entity target, double speedModifier)
method_6335(class_1297 arg0, double arg1)
startMovingTo(Entity entity, double speed)
public boolean
moveTo(Path newPath, double speedModifier)
moveTo(Path newPath, double speedModifier)
method_6334(class_11 arg0, double arg1)
startMovingAlong(Path path, double speed)
public Path
getPath()
getPath()
method_6345()
getCurrentPath()
public void
tick()
tick()
method_6360()
tick()
protected double
getGroundY(Vec3 target)
getGroundY(Vec3 target)
method_38065(class_243 arg0)
adjustTargetY(Vec3d pos)
protected void
followThePath()
followThePath()
method_6339()
continueFollowingPath()
private boolean
shouldTargetNextNodeInDirection(Vec3 mobPosition)
shouldTargetNextNodeInDirection(Vec3 mobPosition)
method_27799(class_243 arg0)
shouldJumpToNextNode(Vec3d currentPos)
protected void
doStuckDetection(Vec3 mobPos)
doStuckDetection(Vec3 mobPos)
method_6346(class_243 arg0)
checkTimeouts(Vec3d currentPos)
private void
timeoutPath()
timeoutPath()
method_31266()
resetNodeAndStop()
private void
resetStuckTimeout()
resetStuckTimeout()
method_26085()
resetNode()
public boolean
isDone()
isDone()
method_6357()
isIdle()
public boolean
isInProgress()
isInProgress()
method_23966()
isFollowingPath()
public void
stop()
stop()
method_6340()
stop()
protected abstract Vec3d
getTempMobPos()
getTempMobPos()
method_6347()
getPos()
protected abstract boolean
canUpdatePath()
canUpdatePath()
method_6358()
isAtValidPosition()
protected void
trimPath()
trimPath()
method_6359()
adjustPath()
protected boolean
canMoveDirectly(Vec3 startPos, Vec3 stopPos)
canMoveDirectly(Vec3 startPos, Vec3 stopPos)
method_6341(class_243 arg0, class_243 arg1)
canPathDirectlyThrough(Vec3d origin, Vec3d target)
public boolean
canCutCorner(PathType pathType)
canCutCorner(PathType pathType)
method_48158(class_7 arg0)
canJumpToNext(PathNodeType nodeType)
protected static boolean
isClearForMovementBetween(Mob mob, Vec3 startPos, Vec3 stopPos, boolean blockedByFluids)
isClearForMovementBetween(Mob mob, Vec3 startPos, Vec3 stopPos, boolean blockedByFluids)
method_43394(class_1308 arg0, class_243 arg1, class_243 arg2, boolean arg3)
doesNotCollide(MobEntity entity, Vec3d startPos, Vec3d entityPos, boolean includeFluids)
public boolean
isStableDestination(BlockPos pos)
isStableDestination(BlockPos pos)
method_6333(class_2338 arg0)
isValidPosition(BlockPos pos)
public PathNodeMaker
getNodeEvaluator()
getNodeEvaluator()
method_6342()
getNodeMaker()
public void
setCanFloat(boolean canFloat)
setCanFloat(boolean canFloat)
method_6354(boolean arg0)
setCanSwim(boolean canSwim)
public boolean
canFloat()
canFloat()
method_6350()
canSwim()
public boolean
shouldRecomputePath(BlockPos pos)
shouldRecomputePath(BlockPos pos)
method_18053(class_2338 arg0)
shouldRecalculatePath(BlockPos pos)
public float
getMaxDistanceToWaypoint()
getMaxDistanceToWaypoint()
method_35143()
getNodeReachProximity()
public boolean
isStuck()
isStuck()
method_31267()
isNearPathStartPos()
public abstract boolean
canNavigateGround()
canNavigateGround()
method_70686()
canControlOpeningDoors()
public void
setCanOpenDoors(boolean canOpenDoors)
setCanOpenDoors(boolean canOpenDoors)
method_70687(boolean arg0)
setCanOpenDoors(boolean canOpenDoors)