Disambiguate Comparator from Bukkit block Comparator.
Co-authored-by: Cursor <cursoragent@cursor.com>
@@ -274,7 +274,7 @@ public final class ContainerPipesPlugin extends JavaPlugin implements Listener,
274
274
private List<BlockPos> findRoute(World world, BlockPos start, BlockPos goal, int range, Set<BlockPos> occupied) {
275
275
if (!isRouteSpace(world.getBlockAt(start.x,start.y,start.z), true) || !isRouteSpace(world.getBlockAt(goal.x,goal.y,goal.z), true)) return null;
276
276
record Node(BlockPos pos, int g, int f) {}
277
PriorityQueue<Node> open = new PriorityQueue<>(Comparator.comparingInt(Node::f));
277
PriorityQueue<Node> open = new PriorityQueue<>(java.util.Comparator.comparingInt(Node::f));
278
278
Map<BlockPos,Integer> g = new HashMap<>();
279
279
Map<BlockPos,BlockPos> prev = new HashMap<>();
280
280
open.add(new Node(start,0,start.manhattan(goal))); g.put(start,0);
@@ -274,7 +274,7 @@ public final class ContainerPipesPlugin extends JavaPlugin implements Listener,274
private List<BlockPos> findRoute(World world, BlockPos start, BlockPos goal, int range, Set<BlockPos> occupied) {274
private List<BlockPos> findRoute(World world, BlockPos start, BlockPos goal, int range, Set<BlockPos> occupied) {275
if (!isRouteSpace(world.getBlockAt(start.x,start.y,start.z), true) || !isRouteSpace(world.getBlockAt(goal.x,goal.y,goal.z), true)) return null;275
if (!isRouteSpace(world.getBlockAt(start.x,start.y,start.z), true) || !isRouteSpace(world.getBlockAt(goal.x,goal.y,goal.z), true)) return null;276
record Node(BlockPos pos, int g, int f) {}276
record Node(BlockPos pos, int g, int f) {}277
PriorityQueue<Node> open = new PriorityQueue<>(Comparator.comparingInt(Node::f));277
PriorityQueue<Node> open = new PriorityQueue<>(java.util.Comparator.comparingInt(Node::f));278
Map<BlockPos,Integer> g = new HashMap<>();278
Map<BlockPos,Integer> g = new HashMap<>();279
Map<BlockPos,BlockPos> prev = new HashMap<>();279
Map<BlockPos,BlockPos> prev = new HashMap<>();280
open.add(new Node(start,0,start.manhattan(goal))); g.put(start,0);280
open.add(new Node(start,0,start.manhattan(goal))); g.put(start,0);@@ -88,7 +88,7 @@ public final class VisualPerformanceManager {
88
88
Set<?> tags=(Set<?>)call(entity,"getScoreboardTags");
89
89
if(tags.contains("containerpipes-filter:"+connectionId))interactions.add(entity);
90
90
}
91
interactions.sort(Comparator.comparingDouble(VisualPerformanceManager::entitySortKey));
91
interactions.sort(java.util.Comparator.comparingDouble(VisualPerformanceManager::entitySortKey));
92
92
for(int i=0;i<interactions.size();i++){
93
93
if(i!=0&&i!=interactions.size()-1&&i%every!=0)call(interactions.get(i),"remove");
94
94
}
@@ -88,7 +88,7 @@ public final class VisualPerformanceManager {88
Set<?> tags=(Set<?>)call(entity,"getScoreboardTags");88
Set<?> tags=(Set<?>)call(entity,"getScoreboardTags");89
if(tags.contains("containerpipes-filter:"+connectionId))interactions.add(entity);89
if(tags.contains("containerpipes-filter:"+connectionId))interactions.add(entity);90
}90
}91
interactions.sort(Comparator.comparingDouble(VisualPerformanceManager::entitySortKey));91
interactions.sort(java.util.Comparator.comparingDouble(VisualPerformanceManager::entitySortKey));92
for(int i=0;i<interactions.size();i++){92
for(int i=0;i<interactions.size();i++){93
if(i!=0&&i!=interactions.size()-1&&i%every!=0)call(interactions.get(i),"remove");93
if(i!=0&&i!=interactions.size()-1&&i%every!=0)call(interactions.get(i),"remove");94
}94
}