Last I asked there wasn't one xd
If you mean a hop function, I haven't tested this and it's pretty hack, so it might completely bomb, but try something like this:
Code:
private final HoppingPathGenerator HOPPER = new HoppingPathGenerator();
private final PathGenerator DEFAULT = Mouse.getPathGenerator();
public void onLoop() {
Mouse.setPathGenerator(HOPPER);
HOPPER.markReady();
Mouse.move();
HOPPER.markReady();
Mouse.move();
Mouse.setPathGenerator(DEFAULT);
}
private class HoppingPathGenerator extends PathGenerator{
private boolean hop = false;
@Override
public boolean move(Interactable target, Filter<Point> successFilter, double velocityMultiplier) {
if(hop){
this.hop(target.getInteractionPoint());
hop = false;
}
return hop;
}
public void markReady(){
hop = true;
}
}
Of course this might be kinda bannable since it's hopping, so you might consider putting a way to toggle normal mouse function for users who don't want to risk it.
Alternatively, the custom path generator could be implemented such that it only returns true for points directly between Mouse#getPosition() and target#getInteractionPoint() so that the mouse will only move in straight lines.
I've been meaning to mess around with the path generator, but I just haven't had time. If you do find something that works, let me know.