Advertisement
Guest User

likemwitdeez

a guest
Sep 17th, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. GameObject getGameObject(Filter<GameObject> f) {
  2.     for (GameObject o : GameObjects.getLoaded()) {
  3.         if (f.accept(o))
  4.             return o;
  5.     }
  6.  
  7.     return null;
  8. }
  9.  
  10. GameObject rocks = getGameObject(new Filter<GameObject>() {
  11.  
  12.     @Override
  13.     public boolean accept(GameObject o) {
  14.         if (o == null || o.getName() == null || o.getName().equals("null"))
  15.             return false;
  16.  
  17.         if (where == Where.MINING_GUILD && !in_guild(o))
  18.             return false;
  19.  
  20.         int id = o.getID();
  21.  
  22.         if (mine_mithril) {
  23.             for (int mithrilRockId : DeezConstants.MITHRIL_ROCK_IDS) {
  24.                 if (id == mithrilRockId)
  25.                     return true;
  26.             }
  27.         }
  28.  
  29.         for (int coalRockId : DeezConstants.COAL_ROCK_IDS) {
  30.             if (id == coalRockId)
  31.                 return true;
  32.         }
  33.  
  34.         return false;
  35.     }
  36.  
  37. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement