stop breaking block when you let go of left click lol
This commit is contained in:
parent
0b4efb24ae
commit
a21ec54d4f
@ -62,7 +62,7 @@ public class MixinKeyBinding {
|
||||
private void isPressed(CallbackInfoReturnable<Boolean> cir) {
|
||||
// only the primary baritone forces keys
|
||||
Boolean force = BaritoneAPI.getProvider().getPrimaryBaritone().getInputOverrideHandler().isInputForcedDown((KeyBinding) (Object) this);
|
||||
if (pressTime > 0 && (KeyBinding) (Object) this == Minecraft.getMinecraft().gameSettings.keyBindAttack && Baritone.settings().clickCancel.get()) {
|
||||
if (pressTime > 0 && (KeyBinding) (Object) this == Minecraft.getMinecraft().gameSettings.keyBindAttack && Baritone.settings().clickCancel.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
|
||||
Helper.HELPER.logDirect("Cancelling path on left click since the clickCancel setting is enabled!");
|
||||
BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().cancelEverything();
|
||||
return;
|
||||
|
@ -301,13 +301,15 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||
public void secretInternalSegmentCancel() {
|
||||
queuePathEvent(PathEvent.CANCELED);
|
||||
synchronized (pathPlanLock) {
|
||||
if (current != null) {
|
||||
current = null;
|
||||
next = null;
|
||||
}
|
||||
baritone.getInputOverrideHandler().clearAllKeys();
|
||||
getInProgress().ifPresent(AbstractNodeCostSearch::cancel);
|
||||
baritone.getInputOverrideHandler().getBlockBreakHelper().stopBreakingBlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void forceCancel() { // NOT exposed on public api
|
||||
cancelEverything();
|
||||
|
Loading…
Reference in New Issue
Block a user