From 47e6a039effb82723370a8cfc009a909d1d1c6ab Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 30 Sep 2019 17:04:33 -0700 Subject: [PATCH] delet --- USAGE.md | 5 ++ .../command/defaults/ClearareaCommand.java | 80 ------------------- .../command/defaults/DefaultCommands.java | 1 - 3 files changed, 5 insertions(+), 81 deletions(-) delete mode 100644 src/main/java/baritone/utils/command/defaults/ClearareaCommand.java diff --git a/USAGE.md b/USAGE.md index 70737b1c..25fef11e 100644 --- a/USAGE.md +++ b/USAGE.md @@ -39,6 +39,11 @@ Some common examples: - `damn` daniel +New commands: +- `sel` to manage selections +- some others + + For the rest of the commands, you can take a look at the code [here](https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/utils/ExampleBaritoneControl.java). All the settings and documentation are here. If you find HTML easier to read than Javadoc, you can look here. diff --git a/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java b/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java deleted file mode 100644 index 39f8809d..00000000 --- a/src/main/java/baritone/utils/command/defaults/ClearareaCommand.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This file is part of Baritone. - * - * Baritone is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Baritone is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Baritone. If not, see . - */ - -package baritone.utils.command.defaults; - -import baritone.api.IBaritone; -import baritone.api.pathing.goals.Goal; -import baritone.api.pathing.goals.GoalBlock; -import baritone.api.utils.BetterBlockPos; -import baritone.api.utils.command.Command; -import baritone.api.utils.command.datatypes.RelativeBlockPos; -import baritone.api.utils.command.exception.CommandException; -import baritone.api.utils.command.exception.CommandInvalidStateException; -import baritone.api.utils.command.helpers.arguments.ArgConsumer; - -import java.util.Arrays; -import java.util.List; -import java.util.stream.Stream; - -public class ClearareaCommand extends Command { - - public ClearareaCommand(IBaritone baritone) { - super(baritone, "cleararea"); - } - - @Override - protected void executed(String label, ArgConsumer args) throws CommandException { - BetterBlockPos pos1 = ctx.playerFeet(); - BetterBlockPos pos2; - if (args.hasAny()) { - args.requireMax(3); - pos2 = args.getDatatypePost(RelativeBlockPos.INSTANCE, pos1); - } else { - args.requireMax(0); - Goal goal = baritone.getCustomGoalProcess().getGoal(); - if (!(goal instanceof GoalBlock)) { - throw new CommandInvalidStateException("Goal is not a GoalBlock"); - } else { - pos2 = new BetterBlockPos(((GoalBlock) goal).getGoalPos()); - } - } - baritone.getBuilderProcess().clearArea(pos1, pos2); - logDirect("Success"); - } - - @Override - protected Stream tabCompleted(String label, ArgConsumer args) { - return args.tabCompleteDatatype(RelativeBlockPos.INSTANCE); - } - - @Override - public String getShortDesc() { - return "Clear an area of all blocks"; - } - - @Override - public List getLongDesc() { - return Arrays.asList( - "Clear an area of all blocks.", - "", - "Usage:", - "> cleararea - Clears the area marked by your current position and the current GoalBlock", - "> cleararea - Custom second corner rather than your goal" - ); - } -} diff --git a/src/main/java/baritone/utils/command/defaults/DefaultCommands.java b/src/main/java/baritone/utils/command/defaults/DefaultCommands.java index 73ddda92..3f8e3908 100644 --- a/src/main/java/baritone/utils/command/defaults/DefaultCommands.java +++ b/src/main/java/baritone/utils/command/defaults/DefaultCommands.java @@ -46,7 +46,6 @@ public final class DefaultCommands { new ForceCancelCommand(baritone), new GcCommand(baritone), new InvertCommand(baritone), - new ClearareaCommand(baritone), new TunnelCommand(baritone), new RenderCommand(baritone), new FarmCommand(baritone),