Class PathNavigation
java.lang.Object
net.minecraft.world.entity.ai.navigation.PathNavigation
- Direct Known Subclasses:
FlyingPathNavigation
,GroundPathNavigation
,WaterBoundPathNavigation
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private boolean
protected int
protected Vec3
protected long
protected Level
private static int
protected float
private float
protected Mob
protected NodeEvaluator
protected Path
private PathFinder
private int
protected double
private BlockPos
protected int
protected long
protected Vec3i
protected double
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canFloat()
protected abstract boolean
canMoveDirectly(Vec3 p_26540_, Vec3 p_26541_, int p_26542_, int p_26543_, int p_26544_)
protected abstract boolean
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
float
getPath()
protected abstract Vec3
boolean
boolean
isDone()
protected boolean
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
recomputePath(BlockPos p_26562_)
void
private void
void
setCanFloat(boolean p_26563_)
void
setMaxVisitedNodesMultiplier(float p_26530_)
void
setSpeedModifier(double p_26518_)
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:
- Constant Field Values
-
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_) -
hasDelayedRecomputation
public boolean hasDelayedRecomputation() -
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() -
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() -
isInLiquid
protected boolean isInLiquid() -
trimPath
protected void trimPath() -
canMoveDirectly
-
isStableDestination
-
getNodeEvaluator
-
setCanFloat
public void setCanFloat(boolean p_26563_) -
canFloat
public boolean canFloat() -
recomputePath
-
getMaxDistanceToWaypoint
public float getMaxDistanceToWaypoint() -
isStuck
public boolean isStuck()
-