Class PathNode

java.lang.Object
net.minecraft.entity.ai.pathing.PathNode
Direct Known Subclasses:
TargetPathNode

public class PathNode
extends Object
  • Field Details

    • x

      public final int x
    • y

      public final int y
    • z

      public final int z
    • hashCode

      private final int hashCode
    • heapIndex

      public int heapIndex
    • penalizedPathLength

      public float penalizedPathLength
    • distanceToNearestTarget

      public float distanceToNearestTarget
    • heapWeight

      public float heapWeight
    • previous

      public PathNode previous
    • visited

      public boolean visited
    • pathLength

      public float pathLength
    • penalty

      public float penalty
    • type

      public PathNodeType type
  • Constructor Details

    • PathNode

      public PathNode​(int x, int y, int z)
  • Method Details

    • copyWithNewPosition

      public PathNode copyWithNewPosition​(int x, int y, int z)
    • hash

      public static int hash​(int x, int y, int z)
    • getDistance

      public float getDistance​(PathNode node)
    • getSquaredDistance

      public float getSquaredDistance​(PathNode node)
    • getManhattanDistance

      public float getManhattanDistance​(PathNode node)
    • getManhattanDistance

      public float getManhattanDistance​(BlockPos pos)
    • getPos

      public BlockPos getPos()
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isInHeap

      public boolean isInHeap()
    • toString

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

      @Environment(CLIENT) public static PathNode fromBuffer​(PacketByteBuf buffer)