blueshirt Posted May 21, 2015 Posted May 21, 2015 doesnt matter where the item came from. how would i do this?
fixthissite Posted May 21, 2015 Posted May 21, 2015 (edited) What's with all these wack requests? One guy wanted code which determined if there were 10 buckets on the ground.. Mind if I ask the reason? Go look at the code I posted on that topic; a simple modification can make it work for what you want. It takes advantage of the Stream API. Simply add a Position parameter, and compare it against item.getPosition() using equals Edited May 21, 2015 by fixthissite
Precise Posted May 21, 2015 Posted May 21, 2015 if(getObjects().filter(obj -> (obj != null && obj.getPosition().equals(new Position(x, y, z)) && obj.getName().equals("name"))).size() == 26) { //do shizz } 1