Have you tried adding logs
log("Can I reach this statement?");
and also what does your getState look like?
You should also look into the InteractionEvent API. it handles visibility checks etc. Real easy to use
http://osbot.org/api/org/osbot/rs07/event/InteractionEvent.html
EXAMPLE SNIPPET:
public boolean interact(final Entity entity, final String option) {
InteractionEvent IE = new InteractionEvent(entity, option);
IE.setOperateCamera(false);
IE.setWalkTo(false);
IE.setHover(true);
if(IE != null) {
execute(IE);
//other checks
}
}
//
if (interact(tree,"Chop"))
///