May 21, 201510 yr 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, 201510 yr by fixthissite
May 21, 201510 yr if(getObjects().filter(obj -> (obj != null && obj.getPosition().equals(new Position(x, y, z)) && obj.getName().equals("name"))).size() == 26) { //do shizz }
Create an account or sign in to comment