Package net.minecraft.pathfinding
Class PathNavigator
java.lang.Object
net.minecraft.pathfinding.PathNavigator
- Direct Known Subclasses:
FlyingPathNavigator
,GroundPathNavigator
,SwimmerPathNavigator
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
private boolean
protected int
protected Vector3d
protected long
protected final World
protected float
private float
protected final MobEntity
protected NodeProcessor
protected Path
private final PathFinder
private int
protected double
private BlockPos
protected int
protected long
protected Vector3i
protected double
protected long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canFloat()
protected abstract boolean
canMoveDirectly
(Vector3d p_75493_1_, Vector3d p_75493_2_, int p_75493_3_, int p_75493_4_, int p_75493_5_) protected abstract boolean
final Path
createPath
(double p_225466_1_, double p_225466_3_, double p_225466_5_, int p_225466_7_) createPath
(Set<BlockPos> p_241390_1_, int p_241390_2_) protected Path
createPath
(Set<BlockPos> p_225464_1_, int p_225464_2_, boolean p_225464_3_, int p_225464_4_) createPath
(Stream<BlockPos> p_225463_1_, int p_225463_2_) createPath
(Entity p_75494_1_, int p_75494_2_) createPath
(BlockPos p_179680_1_, int p_179680_2_) protected abstract PathFinder
createPathFinder
(int p_179679_1_) protected void
doStuckDetection
(Vector3d p_179677_1_) protected void
getPath()
protected abstract Vector3d
boolean
boolean
isDone()
protected boolean
boolean
boolean
isStableDestination
(BlockPos p_188555_1_) boolean
isStuck()
boolean
moveTo
(double p_75492_1_, double p_75492_3_, double p_75492_5_, double p_75492_7_) boolean
boolean
void
void
recomputePath
(BlockPos p_220970_1_) void
private void
void
setCanFloat
(boolean p_212239_1_) void
setMaxVisitedNodesMultiplier
(float p_226335_1_) void
setSpeedModifier
(double p_75489_1_) private boolean
shouldTargetNextNodeInDirection
(Vector3d p_234112_1_) void
stop()
void
tick()
private void
protected void
trimPath()
-
Field Details
-
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
-
PathNavigator
-
-
Method Details
-
resetMaxVisitedNodesMultiplier
public void resetMaxVisitedNodesMultiplier() -
setMaxVisitedNodesMultiplier
public void setMaxVisitedNodesMultiplier(float p_226335_1_) -
getTargetPos
-
createPathFinder
-
setSpeedModifier
public void setSpeedModifier(double p_75489_1_) -
hasDelayedRecomputation
public boolean hasDelayedRecomputation() -
recomputePath
public void recomputePath() -
createPath
@Nullable public final Path createPath(double p_225466_1_, double p_225466_3_, double p_225466_5_, int p_225466_7_) -
createPath
-
createPath
-
createPath
-
createPath
-
createPath
-
moveTo
public boolean moveTo(double p_75492_1_, double p_75492_3_, double p_75492_5_, double p_75492_7_) -
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_212239_1_) -
canFloat
public boolean canFloat() -
recomputePath
-
isStuck
public boolean isStuck()
-