delet
This commit is contained in:
parent
b8c8b1eb69
commit
47e6a039ef
5
USAGE.md
5
USAGE.md
@ -39,6 +39,11 @@ Some common examples:
|
|||||||
- `damn` daniel
|
- `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).
|
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 <a href="https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/Settings.java">here</a>. If you find HTML easier to read than Javadoc, you can look <a href="https://baritone.leijurv.com/baritone/api/Settings.html#field.detail">here</a>.
|
All the settings and documentation are <a href="https://github.com/cabaletta/baritone/blob/master/src/api/java/baritone/api/Settings.java">here</a>. If you find HTML easier to read than Javadoc, you can look <a href="https://baritone.leijurv.com/baritone/api/Settings.html#field.detail">here</a>.
|
||||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
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<String> tabCompleted(String label, ArgConsumer args) {
|
|
||||||
return args.tabCompleteDatatype(RelativeBlockPos.INSTANCE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getShortDesc() {
|
|
||||||
return "Clear an area of all blocks";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> 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 <x> <y> <z> - Custom second corner rather than your goal"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -46,7 +46,6 @@ public final class DefaultCommands {
|
|||||||
new ForceCancelCommand(baritone),
|
new ForceCancelCommand(baritone),
|
||||||
new GcCommand(baritone),
|
new GcCommand(baritone),
|
||||||
new InvertCommand(baritone),
|
new InvertCommand(baritone),
|
||||||
new ClearareaCommand(baritone),
|
|
||||||
new TunnelCommand(baritone),
|
new TunnelCommand(baritone),
|
||||||
new RenderCommand(baritone),
|
new RenderCommand(baritone),
|
||||||
new FarmCommand(baritone),
|
new FarmCommand(baritone),
|
||||||
|
Loading…
Reference in New Issue
Block a user