roguehippo Posted May 12, 2016 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
Tom Posted May 12, 2016 Posted May 12, 2016 (edited) GroundItem item = getGroundItems().closest(g -> g.getName().equalsIgnoreCase("Name") && area.contains(g)) Edited May 12, 2016 by Tom
Token Posted May 12, 2016 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));
Tom Posted May 12, 2016 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
Acerd Posted May 12, 2016 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