April 26, 20178 yr I'm trying to access an Entity at a specific tile on the ground. I found getObjects().get(int x,int y) in the api but its not a list of entities so I cant do anything with it. Edited April 26, 20178 yr by Cloxygen
April 26, 20178 yr RS2Object obj = getObjects().closest(i -> i != null && i.getPosition.equals(new Position(0,0,0)));
April 26, 20178 yr Better not to use closest here, since that uses an additional sorting: getObjects.getAll().stream().filter(Objects::nonNull).filter(obj -> "OBJ_NAME".equals(obj.getName()) && obj.getPosition() == new Position(0, 0, 0)).findFirst().orElse(null); Edited April 26, 20178 yr by Trees