Class BinaryHeap
java.lang.Object
net.minecraft.world.level.pathfinder.BinaryHeap
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeCost
(Node pPoint, float pCost) Changes the provided point's total cost if costIn is smallervoid
clear()
private void
downHeap
(int pIndex) Sorts a point to the rightNode[]
getHeap()
Adds a point to the pathboolean
isEmpty()
peek()
pop()
void
int
size()
private void
upHeap
(int pIndex) Sorts a point to the left
-
Field Details
-
heap
-
size
private int size
-
-
Constructor Details
-
BinaryHeap
public BinaryHeap()
-
-
Method Details
-
insert
Adds a point to the path -
clear
public void clear() -
peek
-
pop
-
remove
-
changeCost
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
-