Class Path
java.lang.Object
net.minecraft.world.level.pathfinder.Path
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Path.DebugDataprivate final floatprivate intprivate final booleanprivate final BlockPos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadvance()booleancanReach()copy()static PathfloatgetEntityPosAtNode(Entity pEntity, int pIndex) Gets the vector of theNodeassociated with the given index.getNextEntityPos(Entity pEntity) intgetNode(int pIndex) Returns theNodelocated at the specified index, usually the current one.intgetNodePos(int pIndex) booleanisDone()boolean(package private) static Node[]readNodeArray(FriendlyByteBuf pBuffer) voidreplaceNode(int pIndex, Node pPoint) booleanReturnstrueif the EntityPath are the same.(package private) voidvoidsetNextNodeIndex(int pCurrentPathIndex) toString()voidtruncateNodes(int pLength) (package private) static voidwriteNodeArray(FriendlyByteBuf pBuffer, Node[] pNodeArray) voidwriteToStream(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 theNodelocated 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 theNodeassociated with the given index. -
getNodePos
-
getNextEntityPos
- Returns:
- the current
PathEntitytarget node as aVec3D
-
getNextNodePos
-
getNextNode
-
getPreviousNode
-
sameAs
Returnstrueif 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
-