Package net.minecraft.pathfinding
Class Path
- java.lang.Object
-
- net.minecraft.pathfinding.Path
-
public class Path extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private PathPoint[]
closedSet
private float
distToTarget
private int
nextNodeIndex
private java.util.List<PathPoint>
nodes
private PathPoint[]
openSet
private boolean
reached
private BlockPos
target
private java.util.Set<FlaggedPathPoint>
targetNodes
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
advance()
boolean
canReach()
static Path
createFromStream(PacketBuffer p_186311_0_)
PathPoint[]
getClosedSet()
float
getDistToTarget()
PathPoint
getEndNode()
Vector3d
getEntityPosAtNode(Entity p_75881_1_, int p_75881_2_)
Vector3d
getNextEntityPos(Entity p_75878_1_)
PathPoint
getNextNode()
int
getNextNodeIndex()
BlockPos
getNextNodePos()
PathPoint
getNode(int p_75877_1_)
int
getNodeCount()
BlockPos
getNodePos(int p_242947_1_)
PathPoint[]
getOpenSet()
PathPoint
getPreviousNode()
BlockPos
getTarget()
boolean
isDone()
boolean
notStarted()
void
replaceNode(int p_186309_1_, PathPoint p_186309_2_)
boolean
sameAs(Path p_75876_1_)
void
setNextNodeIndex(int p_75872_1_)
java.lang.String
toString()
void
truncateNodes(int p_215747_1_)
-
-
-
Field Detail
-
nodes
private final java.util.List<PathPoint> nodes
-
openSet
private PathPoint[] openSet
-
closedSet
private PathPoint[] closedSet
-
targetNodes
private java.util.Set<FlaggedPathPoint> targetNodes
-
nextNodeIndex
private int nextNodeIndex
-
target
private final BlockPos target
-
distToTarget
private final float distToTarget
-
reached
private final boolean reached
-
-
Method Detail
-
advance
public void advance()
-
notStarted
public boolean notStarted()
-
isDone
public boolean isDone()
-
getEndNode
@Nullable public PathPoint getEndNode()
-
getNode
public PathPoint getNode(int p_75877_1_)
-
truncateNodes
public void truncateNodes(int p_215747_1_)
-
replaceNode
public void replaceNode(int p_186309_1_, PathPoint p_186309_2_)
-
getNodeCount
public int getNodeCount()
-
getNextNodeIndex
public int getNextNodeIndex()
-
setNextNodeIndex
public void setNextNodeIndex(int p_75872_1_)
-
getNodePos
public BlockPos getNodePos(int p_242947_1_)
-
getNextNodePos
public BlockPos getNextNodePos()
-
getNextNode
public PathPoint getNextNode()
-
getPreviousNode
@Nullable public PathPoint getPreviousNode()
-
sameAs
public boolean sameAs(@Nullable Path p_75876_1_)
-
canReach
public boolean canReach()
-
getOpenSet
public PathPoint[] getOpenSet()
-
getClosedSet
public PathPoint[] getClosedSet()
-
createFromStream
public static Path createFromStream(PacketBuffer p_186311_0_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getTarget
public BlockPos getTarget()
-
getDistToTarget
public float getDistToTarget()
-
-