Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GameObject getGameObject(Filter<GameObject> f) {
- for (GameObject o : GameObjects.getLoaded()) {
- if (f.accept(o))
- return o;
- }
- return null;
- }
- GameObject rocks = getGameObject(new Filter<GameObject>() {
- @Override
- public boolean accept(GameObject o) {
- if (o == null || o.getName() == null || o.getName().equals("null"))
- return false;
- if (where == Where.MINING_GUILD && !in_guild(o))
- return false;
- int id = o.getID();
- if (mine_mithril) {
- for (int mithrilRockId : DeezConstants.MITHRIL_ROCK_IDS) {
- if (id == mithrilRockId)
- return true;
- }
- }
- for (int coalRockId : DeezConstants.COAL_ROCK_IDS) {
- if (id == coalRockId)
- return true;
- }
- return false;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement