2018-03-13 10:33:32 -04:00
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
public class DropperThread implements Runnable {
|
|
|
|
Thread dropperThread;
|
|
|
|
Inventory inventory;
|
|
|
|
Cursor cursor;
|
|
|
|
|
|
|
|
public DropperThread(Inventory inventory, Cursor cursor) {
|
|
|
|
this.inventory = inventory;
|
|
|
|
this.cursor = cursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
try {
|
2018-03-13 11:15:08 -04:00
|
|
|
//inventory.update();
|
2018-03-13 10:33:32 -04:00
|
|
|
cursor.moveAndRightlickAtCoordinatesWithRandomness(inventory.getClickCoordinatesForInventorySlot(0, 0), 15, 15);
|
|
|
|
} catch (IOException e) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
} catch (Exception e) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
System.out.println("~~~~~~~~~~~~~ dropperThread finished!");
|
|
|
|
}
|
|
|
|
|
|
|
|
public void start() {
|
|
|
|
System.out.println("dropperThread started");
|
|
|
|
if (dropperThread == null) {
|
|
|
|
dropperThread = new Thread(this, "dropperThread");
|
|
|
|
dropperThread.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public void waitTillDone() throws InterruptedException {
|
|
|
|
dropperThread.join();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|