moaaaaaaaar patches

This commit is contained in:
Jake Potrebic
2021-11-24 12:15:19 -08:00
parent 11bdf4fca7
commit 5b5f1caeb9
30 changed files with 37 additions and 47 deletions

View File

@@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- List<Player> list = world.players().stream().filter(EntitySelector.NO_SPECTATORS).filter((player) -> {
- return entity.closerThan(player, 16.0D);
- }).sorted(Comparator.comparingDouble(entity::distanceToSqr)).collect(Collectors.toList());
+ List<Player> players= new java.util.ArrayList<>(world.players());
+ List<Player> players = new java.util.ArrayList<>(world.players());
+ players.removeIf(player -> !EntitySelector.NO_SPECTATORS.test(player) || !entity.closerThan(player, 16.0D));
+ players.sort(Comparator.comparingDouble(entity::distanceTo));
Brain<?> brain = entity.getBrain();