Replace lambda with method reference
This commit is contained in:
parent
e9308d7e70
commit
1889e37493
@ -140,7 +140,7 @@ public class ExampleBaritoneControl extends Behavior {
|
||||
return;
|
||||
}
|
||||
BlockPos playerFeet = playerFeet();
|
||||
locs.sort(Comparator.comparingDouble(pos -> playerFeet.distanceSq(pos)));
|
||||
locs.sort(Comparator.comparingDouble(playerFeet::distanceSq));
|
||||
|
||||
// remove any that are within loaded chunks that aren't actually what we want
|
||||
locs.removeAll(locs.stream()
|
||||
|
Loading…
Reference in New Issue
Block a user