Replace ArrayList type fields with List

This commit is contained in:
Brady
2018-08-25 18:35:41 -05:00
parent 32a0f4eaac
commit 72c2a58ef2
4 changed files with 4 additions and 4 deletions

View File

@@ -272,7 +272,7 @@ public class ExampleBaritoneControl extends Behavior {
}
if (msg.toLowerCase().equals("costs")) {
Movement[] movements = AStarPathFinder.getConnectedPositions(new BetterBlockPos(playerFeet()), new CalculationContext());
ArrayList<Movement> moves = new ArrayList<>(Arrays.asList(movements));
List<Movement> moves = new ArrayList<>(Arrays.asList(movements));
moves.sort(Comparator.comparingDouble(movement -> movement.getCost(new CalculationContext())));
for (Movement move : moves) {
String[] parts = move.getClass().toString().split("\\.");