From 2fba8b629981537b889334a35ad2984ff5ef3af6 Mon Sep 17 00:00:00 2001 From: Caleb Burke Date: Sat, 4 Jul 2026 05:44:22 -0700 Subject: [PATCH] adding potato farmer --- .../java/skybot/commands/CommandManager.java | 9 +++- .../java/skybot/farmers/PotatoFarmer.java | 44 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/client/java/skybot/farmers/PotatoFarmer.java diff --git a/src/client/java/skybot/commands/CommandManager.java b/src/client/java/skybot/commands/CommandManager.java index 17e0ad8..0d90c40 100644 --- a/src/client/java/skybot/commands/CommandManager.java +++ b/src/client/java/skybot/commands/CommandManager.java @@ -7,6 +7,7 @@ import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.command.CommandRegistryAccess; import skybot.SkybotClient; import skybot.farmers.CarrotFarmer; +import skybot.farmers.PotatoFarmer; import skybot.farmers.TestFarmer; import skybot.utilities.ChatMenu; @@ -23,11 +24,17 @@ public class CommandManager { } return 1; })) - .then(literal("carrots").executes(context -> { + .then(literal("carrot").executes(context -> { if (SkybotClient.startBot(new CarrotFarmer())) { ChatMenu.send("§aStarting Carrot Farmer...§r"); } return 1; + })) + .then(literal("potato").executes(context -> { + if (SkybotClient.startBot(new PotatoFarmer())) { + ChatMenu.send("§aStarting Potato Farmer...§r"); + } + return 1; }))); dispatcher.register(literal("skybot") diff --git a/src/client/java/skybot/farmers/PotatoFarmer.java b/src/client/java/skybot/farmers/PotatoFarmer.java new file mode 100644 index 0000000..35f83d9 --- /dev/null +++ b/src/client/java/skybot/farmers/PotatoFarmer.java @@ -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); + } + } +}