If you wan't to keep your sanity for as long as possible I recommend going with the Enum/State skeleton/style Example:
public class Enum extends Script {
boolean dropping = false;
private enum State{
DROP, CHOP
}
@Override
public int onLoop() throws InterruptedException {
switch(getState()){
case DROP:
drop();
break;
case CHOP:
chop();
break;
}
return random(100, 250);
}
private void drop(){
//do dropping stuff
}
private void chop(){
//do chopping stuff
}
State getState(){
if(inventory.isFull() || dropping){
return State.DROP;
}else{
return State.CHOP;
}
}
}
Sure it has more base framework than the Logic loop style
public class LogicLoop extends Script {
boolean dropping = false;
@Override
public int onLoop() throws InterruptedException {
if(inventory.isFull() || dropping){
//do dropping stuff
}else{
//do chopping stuff
}
return random(100,250);
}
}
But depending on the length/complexity of your script the logic loop method can get quite messy and the Enum/State method retains neatness and easy readability.