Added defaults and javadocs
This commit is contained in:
@@ -45,7 +45,7 @@ public class FarmCommand extends Command {
|
||||
public void execute(String label, IArgConsumer args) throws CommandException {
|
||||
args.requireMax(2);
|
||||
int range = 0;
|
||||
BetterBlockPos origin;
|
||||
BetterBlockPos origin = null;
|
||||
//range
|
||||
if (args.has(1)) {
|
||||
range = args.getAs(Integer.class);
|
||||
@@ -81,11 +81,8 @@ public class FarmCommand extends Command {
|
||||
} else {
|
||||
origin = waypoint.getLocation();
|
||||
}
|
||||
} else {
|
||||
origin = baritone.getPlayerContext().playerFeet();
|
||||
}
|
||||
|
||||
|
||||
baritone.getFarmProcess().farm(range, origin);
|
||||
logDirect("Farming");
|
||||
}
|
||||
|
||||
@@ -101,7 +101,11 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
||||
|
||||
@Override
|
||||
public void farm(int range, BlockPos pos) {
|
||||
center = pos;
|
||||
if (pos == null) {
|
||||
center = baritone.getPlayerContext().playerFeet();
|
||||
} else {
|
||||
center = pos;
|
||||
}
|
||||
this.range = range;
|
||||
active = true;
|
||||
locations = null;
|
||||
|
||||
Reference in New Issue
Block a user