Class BinaryHeap

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

public class BinaryHeap extends Object
  • Field Details

    • heap

      private Node[] heap
    • size

      private int size
  • Constructor Details

    • BinaryHeap

      public BinaryHeap()
  • Method Details

    • insert

      public Node insert(Node pPoint)
      Adds a point to the path
    • clear

      public void clear()
    • peek

      public Node peek()
    • pop

      public Node pop()
    • remove

      public void remove(Node pNode)
    • changeCost

      public void changeCost(Node pPoint, float pCost)
      Changes the provided point's total cost if costIn is smaller
    • size

      public int size()
    • upHeap

      private void upHeap(int pIndex)
      Sorts a point to the left
    • downHeap

      private void downHeap(int pIndex)
      Sorts a point to the right
    • isEmpty

      public boolean isEmpty()
    • getHeap

      public Node[] getHeap()