Add right-click auto replant setting (mod compat, pams harvest craft)
This commit is contained in:
parent
574cb74397
commit
6ba8e5ea5b
@ -884,6 +884,11 @@ public final class Settings {
|
||||
*/
|
||||
public final Setting<Boolean> replantCrops = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Right click crops, don't break
|
||||
*/
|
||||
public final Setting<Boolean> assumeAutoReplant = new Setting<>(false);
|
||||
|
||||
/**
|
||||
* Replant nether wart while farming. This setting only has an effect when replantCrops is also enabled
|
||||
*/
|
||||
|
@ -235,10 +235,16 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
||||
Optional<Rotation> rot = RotationUtils.reachable(ctx, pos);
|
||||
if (rot.isPresent() && isSafeToCancel) {
|
||||
baritone.getLookBehavior().updateTarget(rot.get(), 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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user