private boolean lootItems(Position targetPosition) {
List<String> itemsToLoot = Stream.of("Feather", "Bones").collect(Collectors.toList());
GroundItem itemToLoot = getGroundItems().closest(item -> item.getPosition().equals(targetPosition) && itemsToLoot.contains(item.getName()));
if (itemToLoot != null) {
if (itemToLoot.interact("Take")) {
Timing.waitCondition(() -> !itemToLoot.exists(), 5_000);
}
return true;
}
return false;
}
Pick them up 1 by 1, returns true when loot is found