Class Path
java.lang.Object
net.minecraft.world.level.pathfinder.Path
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @Nullable Path.DebugDataprivate final floatprivate intprivate final booleanstatic final StreamCodec<FriendlyByteBuf, Path> private final BlockPos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadvance()booleancanReach()copy()static PathcreateFromStream(FriendlyByteBuf buffer) @Nullable Path.DebugDatabooleanfloat@Nullable NodegetEntityPosAtNode(Entity entity, int index) Gets the vector of theNodeassociated with the given index.getNextEntityPos(Entity entity) intgetNode(int i) Returns theNodelocated at the specified index, usually the current one.intgetNodePos(int index) @Nullable NodeinthashCode()booleanisDone()booleanprivate static Node[]readNodeArray(FriendlyByteBuf input) voidreplaceNode(int index, Node replaceWith) booleanReturnstrueif the EntityPath are the same.(package private) voidvoidsetNextNodeIndex(int nextNodeIndex) toString()voidtruncateNodes(int index) private static voidwriteNodeArray(FriendlyByteBuf output, Node[] nodes) voidwriteToStream(FriendlyByteBuf buffer)
-
Field Details
-
STREAM_CODEC
-
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
-
truncateNodes
public void truncateNodes(int index) -
replaceNode
-
getNodeCount
public int getNodeCount() -
getNextNodeIndex
public int getNextNodeIndex() -
setNextNodeIndex
public void setNextNodeIndex(int nextNodeIndex) -
getEntityPosAtNode
-
getNodePos
-
getNextEntityPos
-
getNextNodePos
-
getNextNode
-
getPreviousNode
-
sameAs
Returnstrueif the EntityPath are the same. Non instance related equals. -
equals
-
hashCode
-
canReach
public boolean canReach() -
setDebug
-
debugData
-
writeToStream
-
createFromStream
-
toString
-
getTarget
-
getDistToTarget
public float getDistToTarget() -
readNodeArray
-
writeNodeArray
-
copy
-