Spork Posted November 4, 2017 Share Posted November 4, 2017 (edited) Hey, I've fingered through the docs and I don't really grasp the concept of the Filter class, but I'm trying to achieve a goal Essentially GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(getArea()) && !closestGroundItem.getName().contains("meat")) is what I'm trying to accomplish, but I don't know how I would define the closestGroundItem before construction. I don't want my player stuck in a conditional statement that just leaves it hung because the closest item is meat, I want it to skip to the next closest item. How would I do this? Edit: I've solved it myself, sorry. Solution: List<GroundItem> t = getGroundItems().getAll().stream().filter((n) -> !n.getName().contains("meat")).collect(Collectors.toList()); for(GroundItem item : t) { doStuff(); } Edited November 4, 2017 by Spork Quote Link to comment Share on other sites More sharing options...