Class PathNavigation
java.lang.Object
net.minecraft.world.entity.ai.navigation.PathNavigation
- Direct Known Subclasses:
AmphibiousPathNavigation
,FlyingPathNavigation
,GroundPathNavigation
,WaterBoundPathNavigation
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private boolean
protected int
protected Vec3
protected long
protected final Level
private static final int
protected float
private float
protected final Mob
protected NodeEvaluator
protected Path
private final PathFinder
private int
protected double
private static final int
private static final float
private BlockPos
protected int
protected long
protected Vec3i
protected double
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCutCorner
(BlockPathTypes p_265292_) boolean
canFloat()
protected boolean
canMoveDirectly
(Vec3 p_186133_, Vec3 p_186134_) protected abstract boolean
final Path
createPath
(double p_26525_, double p_26526_, double p_26527_, int p_26528_) createPath
(Set<BlockPos> p_26549_, int p_26550_) protected Path
createPath
(Set<BlockPos> p_26552_, int p_26553_, boolean p_26554_, int p_26555_) protected Path
createPath
(Set<BlockPos> p_148223_, int p_148224_, boolean p_148225_, int p_148226_, float p_148227_) createPath
(Stream<BlockPos> p_26557_, int p_26558_) createPath
(BlockPos p_26546_, int p_26547_) createPath
(BlockPos p_148219_, int p_148220_, int p_148221_) createPath
(Entity p_26534_, int p_26535_) protected abstract PathFinder
createPathFinder
(int p_26531_) protected void
doStuckDetection
(Vec3 p_26539_) protected void
protected double
getGroundY
(Vec3 p_186132_) float
getPath()
protected abstract Vec3
protected static boolean
isClearForMovementBetween
(Mob p_262599_, Vec3 p_262674_, Vec3 p_262586_, boolean p_262676_) boolean
isDone()
boolean
boolean
isStableDestination
(BlockPos p_26545_) boolean
isStuck()
boolean
moveTo
(double p_26520_, double p_26521_, double p_26522_, double p_26523_) boolean
boolean
void
void
private void
void
setCanFloat
(boolean p_26563_) void
setMaxVisitedNodesMultiplier
(float p_26530_) void
setSpeedModifier
(double p_26518_) boolean
shouldRecomputePath
(BlockPos p_200904_) private boolean
shouldTargetNextNodeInDirection
(Vec3 p_26560_) void
stop()
void
tick()
private void
protected void
trimPath()
-
Field Details
-
MAX_TIME_RECOMPUTE
private static final int MAX_TIME_RECOMPUTE- See Also:
-
STUCK_CHECK_INTERVAL
private static final int STUCK_CHECK_INTERVAL- See Also:
-
STUCK_THRESHOLD_DISTANCE_FACTOR
private static final float STUCK_THRESHOLD_DISTANCE_FACTOR- See Also:
-
mob
-
level
-
path
-
speedModifier
protected double speedModifier -
tick
protected int tick -
lastStuckCheck
protected int lastStuckCheck -
lastStuckCheckPos
-
timeoutCachedNode
-
timeoutTimer
protected long timeoutTimer -
lastTimeoutCheck
protected long lastTimeoutCheck -
timeoutLimit
protected double timeoutLimit -
maxDistanceToWaypoint
protected float maxDistanceToWaypoint -
hasDelayedRecomputation
protected boolean hasDelayedRecomputation -
timeLastRecompute
protected long timeLastRecompute -
nodeEvaluator
-
targetPos
-
reachRange
private int reachRange -
maxVisitedNodesMultiplier
private float maxVisitedNodesMultiplier -
pathFinder
-
isStuck
private boolean isStuck
-
-
Constructor Details
-
PathNavigation
-
-
Method Details
-
resetMaxVisitedNodesMultiplier
public void resetMaxVisitedNodesMultiplier() -
setMaxVisitedNodesMultiplier
public void setMaxVisitedNodesMultiplier(float p_26530_) -
getTargetPos
-
createPathFinder
-
setSpeedModifier
public void setSpeedModifier(double p_26518_) -
recomputePath
public void recomputePath() -
createPath
@Nullable public final Path createPath(double p_26525_, double p_26526_, double p_26527_, int p_26528_) -
createPath
-
createPath
-
createPath
-
createPath
-
createPath
-
createPath
-
createPath
-
moveTo
public boolean moveTo(double p_26520_, double p_26521_, double p_26522_, double p_26523_) -
moveTo
-
moveTo
-
getPath
-
tick
public void tick() -
getGroundY
-
followThePath
protected void followThePath() -
shouldTargetNextNodeInDirection
-
doStuckDetection
-
timeoutPath
private void timeoutPath() -
resetStuckTimeout
private void resetStuckTimeout() -
isDone
public boolean isDone() -
isInProgress
public boolean isInProgress() -
stop
public void stop() -
getTempMobPos
-
canUpdatePath
protected abstract boolean canUpdatePath() -
trimPath
protected void trimPath() -
canMoveDirectly
-
canCutCorner
-
isClearForMovementBetween
-
isStableDestination
-
getNodeEvaluator
-
setCanFloat
public void setCanFloat(boolean p_26563_) -
canFloat
public boolean canFloat() -
shouldRecomputePath
-
getMaxDistanceToWaypoint
public float getMaxDistanceToWaypoint() -
isStuck
public boolean isStuck()
-