Skip to content

Commit

Permalink
Make valid player acquisition respect max distance setting
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTas committed Jan 4, 2025
1 parent 074b4fc commit d7f7acc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,9 @@ private void findValidPlayers() {
for (Entity entity : mc.world.getEntities()) {
if (entity.equals(mc.player)) continue;
if (entity instanceof PlayerEntity player && targetPlayers.get().contains(player.getName().getString().toLowerCase())) {
validTargets.add(entity);
if (entity.getBlockPos().isWithinDistance(mc.player.getBlockPos(), maxDistance.get())) {
validTargets.add(entity);
}
}
}
}
Expand Down

0 comments on commit d7f7acc

Please sign in to comment.