Class Path
java.lang.Object
net.minecraft.world.level.pathfinder.Path
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Path.DebugData
private final float
private int
private final boolean
private final BlockPos
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance()
boolean
canReach()
copy()
static Path
float
getEntityPosAtNode
(Entity pEntity, int pIndex) Gets the vector of theNode
associated with the given index.getNextEntityPos
(Entity pEntity) int
getNode
(int pIndex) Returns theNode
located at the specified index, usually the current one.int
getNodePos
(int pIndex) boolean
isDone()
boolean
(package private) static Node[]
readNodeArray
(FriendlyByteBuf pBuffer) void
replaceNode
(int pIndex, Node pPoint) boolean
Returnstrue
if the EntityPath are the same.(package private) void
void
setNextNodeIndex
(int pCurrentPathIndex) toString()
void
truncateNodes
(int pLength) (package private) static void
writeNodeArray
(FriendlyByteBuf pBuffer, Node[] pNodeArray) void
writeToStream
(FriendlyByteBuf pBuffer)
-
Field Details
-
nodes
-
debugData
-
nextNodeIndex
private int nextNodeIndex -
target
-
distToTarget
private final float distToTarget -
reached
private final boolean reached
-
-
Constructor Details
-
Path
-
-
Method Details
-
advance
public void advance() -
notStarted
public boolean notStarted() -
isDone
public boolean isDone() -
getEndNode
-
getNode
Returns theNode
located at the specified index, usually the current one. -
truncateNodes
public void truncateNodes(int pLength) -
replaceNode
-
getNodeCount
public int getNodeCount() -
getNextNodeIndex
public int getNextNodeIndex() -
setNextNodeIndex
public void setNextNodeIndex(int pCurrentPathIndex) -
getEntityPosAtNode
Gets the vector of theNode
associated with the given index. -
getNodePos
-
getNextEntityPos
- Returns:
- the current
PathEntity
target node as aVec3D
-
getNextNodePos
-
getNextNode
-
getPreviousNode
-
sameAs
Returnstrue
if the EntityPath are the same. Non instance related equals. -
canReach
public boolean canReach() -
setDebug
-
debugData
-
writeToStream
-
createFromStream
-
toString
-
getTarget
-
getDistToTarget
public float getDistToTarget() -
readNodeArray
-
writeNodeArray
-
copy
-