diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index a3e952c7..25640832 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -884,6 +884,11 @@ public final class Settings { */ public final Setting replantCrops = new Setting<>(true); + /** + * Right click crops, don't break + */ + public final Setting assumeAutoReplant = new Setting<>(false); + /** * Replant nether wart while farming. This setting only has an effect when replantCrops is also enabled */ diff --git a/src/main/java/baritone/process/FarmProcess.java b/src/main/java/baritone/process/FarmProcess.java index 0ef85f07..0c4bba32 100644 --- a/src/main/java/baritone/process/FarmProcess.java +++ b/src/main/java/baritone/process/FarmProcess.java @@ -235,9 +235,15 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro Optional rot = RotationUtils.reachable(ctx, pos); if (rot.isPresent() && isSafeToCancel) { baritone.getLookBehavior().updateTarget(rot.get(), true); - MovementHelper.switchToBestToolFor(ctx, ctx.world().getBlockState(pos)); - if (ctx.isLookingAt(pos)) { - baritone.getInputOverrideHandler().setInputForceState(Input.CLICK_LEFT, true); + if (Baritone.settings().assumeAutoReplant.value) { + if (ctx.isLookingAt(pos)) { + baritone.getInputOverrideHandler().setInputForceState(Input.CLICK_RIGHT, true); + } + } else { + MovementHelper.switchToBestToolFor(ctx, ctx.world().getBlockState(pos)); + if (ctx.isLookingAt(pos)) { + baritone.getInputOverrideHandler().setInputForceState(Input.CLICK_LEFT, true); + } } return new PathingCommand(null, PathingCommandType.REQUEST_PAUSE); }