@@ -7,6 +7,7 @@ import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
|||||||
import net.minecraft.command.CommandRegistryAccess;
|
import net.minecraft.command.CommandRegistryAccess;
|
||||||
import skybot.SkybotClient;
|
import skybot.SkybotClient;
|
||||||
import skybot.farmers.CarrotFarmer;
|
import skybot.farmers.CarrotFarmer;
|
||||||
|
import skybot.farmers.PotatoFarmer;
|
||||||
import skybot.farmers.TestFarmer;
|
import skybot.farmers.TestFarmer;
|
||||||
import skybot.utilities.ChatMenu;
|
import skybot.utilities.ChatMenu;
|
||||||
|
|
||||||
@@ -23,11 +24,17 @@ public class CommandManager {
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}))
|
}))
|
||||||
.then(literal("carrots").executes(context -> {
|
.then(literal("carrot").executes(context -> {
|
||||||
if (SkybotClient.startBot(new CarrotFarmer())) {
|
if (SkybotClient.startBot(new CarrotFarmer())) {
|
||||||
ChatMenu.send("§aStarting Carrot Farmer...§r");
|
ChatMenu.send("§aStarting Carrot Farmer...§r");
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
}))
|
||||||
|
.then(literal("potato").executes(context -> {
|
||||||
|
if (SkybotClient.startBot(new PotatoFarmer())) {
|
||||||
|
ChatMenu.send("§aStarting Potato Farmer...§r");
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
})));
|
})));
|
||||||
|
|
||||||
dispatcher.register(literal("skybot")
|
dispatcher.register(literal("skybot")
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package skybot.farmers;
|
||||||
|
|
||||||
|
import skybot.controller.Controller;
|
||||||
|
import skybot.controller.task.HoldKeyTask;
|
||||||
|
import skybot.controller.task.PressButtonTask;
|
||||||
|
import skybot.controller.task.ReleaseButtonTask;
|
||||||
|
import skybot.controller.task.RunCommandTask;
|
||||||
|
import skybot.controller.task.TaskQueue;
|
||||||
|
|
||||||
|
public class PotatoFarmer implements Farmer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void enqueue(TaskQueue queue) {
|
||||||
|
queue.clear();
|
||||||
|
|
||||||
|
queue.add(new RunCommandTask("warp garden"), 1998);
|
||||||
|
|
||||||
|
int EPOCHS = 2;
|
||||||
|
|
||||||
|
for (int i = 0; i < EPOCHS; i++) {
|
||||||
|
queue.add(new PressButtonTask(Controller::setLeftClick), 2021);
|
||||||
|
queue.add(new HoldKeyTask(Controller::setRight, 119555));
|
||||||
|
queue.add(new ReleaseButtonTask(Controller::setLeftClick));
|
||||||
|
|
||||||
|
queue.add(new PressButtonTask(Controller::setLeftClick), 2015);
|
||||||
|
queue.add(new HoldKeyTask(Controller::setLeft, 119402));
|
||||||
|
queue.add(new ReleaseButtonTask(Controller::setLeftClick));
|
||||||
|
|
||||||
|
queue.add(new PressButtonTask(Controller::setLeftClick), 1998);
|
||||||
|
queue.add(new HoldKeyTask(Controller::setRight, 119223));
|
||||||
|
queue.add(new ReleaseButtonTask(Controller::setLeftClick));
|
||||||
|
|
||||||
|
queue.add(new PressButtonTask(Controller::setLeftClick), 2203);
|
||||||
|
queue.add(new HoldKeyTask(Controller::setLeft, 119198));
|
||||||
|
queue.add(new ReleaseButtonTask(Controller::setLeftClick));
|
||||||
|
|
||||||
|
queue.add(new PressButtonTask(Controller::setLeftClick), 1998);
|
||||||
|
queue.add(new HoldKeyTask(Controller::setRight, 120155));
|
||||||
|
queue.add(new ReleaseButtonTask(Controller::setLeftClick));
|
||||||
|
|
||||||
|
queue.add(new RunCommandTask("warp garden"), 2126);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user