This won't be accurate under a lot of circumstances.
1:
double x = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterX();
double y = n.model.getBoundingBox(n.getGridX(), n.getGridY(), n.getZ()).getCenterY();
Consider an object with a hollow center as such:
Red is the object, green is the bounding box, and the blue X is the center. Under every circumstance you are saying that the destination should be at this position, which is not actually clickable.
2:
if (g.interact(action)) {
sleep(random(900, 1200));
}
This is still calling InteractionEvent, which is walking, updating camera, closing out of open interfaces, calling the mouse move events, mouse click events, menu API, etc.
Also the above code would not work well with ground item stacks and probably not NPC stacks either, because the bounding box which you are creating is coming from GraphicUtilities.
This is a pretty good start but I would really recommend fully understanding InteractionEvent so you can create your interactions that are tailored to your script.