This is what I use to swap items in inventory spaces.
public boolean swapItems(int slot1, int slot2) throws InterruptedException {
if (getInventory().isItemSelected()) {
getInventory().deselectItem();
}
return getMouse().continualClick(getInventory().getMouseDestination(slot1), new Condition() {
@Override
public boolean evaluate() {
getMouse().move(getInventory().getMouseDestination(slot2), true);
return getInventory().getMouseDestination(slot2).getBoundingBox().contains(getMouse().getPosition());
}
});
}
Kinda messy, but it works.