java.lang.Object
net.minecraft.world.level.pathfinder.Path

public class Path extends Object
  • Field Details

    • nodes

      private final List<Node> nodes
    • debugData

      @Nullable private Path.DebugData debugData
    • nextNodeIndex

      private int nextNodeIndex
    • target

      private final BlockPos target
    • distToTarget

      private final float distToTarget
    • reached

      private final boolean reached
  • Constructor Details

    • Path

      public Path(List<Node> p_77371_, BlockPos p_77372_, boolean p_77373_)
  • Method Details

    • advance

      public void advance()
    • notStarted

      public boolean notStarted()
    • isDone

      public boolean isDone()
    • getEndNode

      @Nullable public Node getEndNode()
    • getNode

      public Node getNode(int p_77376_)
    • truncateNodes

      public void truncateNodes(int p_77389_)
    • replaceNode

      public void replaceNode(int p_77378_, Node p_77379_)
    • getNodeCount

      public int getNodeCount()
    • getNextNodeIndex

      public int getNextNodeIndex()
    • setNextNodeIndex

      public void setNextNodeIndex(int p_77394_)
    • getEntityPosAtNode

      public Vec3 getEntityPosAtNode(Entity p_77383_, int p_77384_)
    • getNodePos

      public BlockPos getNodePos(int p_77397_)
    • getNextEntityPos

      public Vec3 getNextEntityPos(Entity p_77381_)
    • getNextNodePos

      public BlockPos getNextNodePos()
    • getNextNode

      public Node getNextNode()
    • getPreviousNode

      @Nullable public Node getPreviousNode()
    • sameAs

      public boolean sameAs(@Nullable Path p_77386_)
    • canReach

      public boolean canReach()
    • setDebug

      void setDebug(Node[] p_164710_, Node[] p_164711_, Set<Target> p_164712_)
    • debugData

      @Nullable public Path.DebugData debugData()
    • writeToStream

      public void writeToStream(FriendlyByteBuf p_164705_)
    • createFromStream

      public static Path createFromStream(FriendlyByteBuf p_77391_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTarget

      public BlockPos getTarget()
    • getDistToTarget

      public float getDistToTarget()
    • readNodeArray

      static Node[] readNodeArray(FriendlyByteBuf p_300065_)
    • writeNodeArray

      static void writeNodeArray(FriendlyByteBuf p_300557_, Node[] p_301136_)
    • copy

      public Path copy()