roguehippo Posted May 12, 2016 Share Posted May 12, 2016 Hello forums, I am trying to figure out how to either use a type of filter that will work with GroundItems. or a way to get all of the closest GroundItems inside of a certain area During the initialization of the ground item. thanks Quote Link to comment Share on other sites More sharing options...
Tom Posted May 12, 2016 Share Posted May 12, 2016 (edited) GroundItem item = getGroundItems().closest(g -> g.getName().equalsIgnoreCase("Name") && area.contains(g)) Edited May 12, 2016 by Tom Quote Link to comment Share on other sites More sharing options...
Token Posted May 12, 2016 Share Posted May 12, 2016 Apply area filter: GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(AREA)); You can also add other filters for example a name filter: GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(AREA), new NameFilter<GroundItem>(NAME)); Quote Link to comment Share on other sites More sharing options...
Tom Posted May 12, 2016 Share Posted May 12, 2016 Apply area filter: GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(AREA)); You can also add other filters for example a name filter: GroundItem item = groundItems.closest(new AreaFilter<GroundItem>(AREA), new NameFilter<GroundItem>(NAME)); The fk i need to read docs every once in a while 1 Quote Link to comment Share on other sites More sharing options...
Acerd Posted May 12, 2016 Share Posted May 12, 2016 The fk i need to read docs every once in a while Why do you think he always complains when docs are down Quote Link to comment Share on other sites More sharing options...