It's getting a little bit spaghetti, might be worth re-thinking how you approach this problem!
I would suggest creating a pickaxe enum, for example:
public enum Pickaxe {
BRONZE_PICKAXE(1), IRON_PICKAXE(1), /* ... */ DRAGON_PICKAXE(61);
private final int levelReq;
Pickaxe(int levelReq) {
this.levelReq = levelReq;
}
public int getRequiredLevel() { return levelReq; }
public boolean hasRequiredLevel(MethodProvider mp) {
return mp.getSkills().getStatic(Skill.MINING) >= levelReq;
}
public boolean equip(MethodProvider mp) { /* ... */ }
@Override public String toString() { return super./* ... */; }
}
Then you can use this to determine the highest tier pickaxe to use, i.e
Arrays.asList(Pickaxe.values()).stream().filter(pick -> pick.hasRequiredLevel(mp)). /* ... Reduction to highest required level ... */
I've left gaps here and there for you to implement so hopefully you learn something new ! Also, hopefully there are no errors, but I wrote the code in the reply box so if there are, sorry about that, just let me know!
Edit: Or, alternatively, you could just as easily use a for loop with some simple logic (i.e "for (Pickaxe axe : Pickaxe.values()) { ... }" ) to find the best pickaxe. I just like streams cause you can make it a tidy one-liner
Good luck!
-Apa