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) {
|
private void isPressed(CallbackInfoReturnable<Boolean> cir) {
|
||||||
// only the primary baritone forces keys
|
// only the primary baritone forces keys
|
||||||
Boolean force = BaritoneAPI.getProvider().getPrimaryBaritone().getInputOverrideHandler().isInputForcedDown((KeyBinding) (Object) this);
|
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!");
|
Helper.HELPER.logDirect("Cancelling path on left click since the clickCancel setting is enabled!");
|
||||||
BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().cancelEverything();
|
BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().cancelEverything();
|
||||||
return;
|
return;
|
||||||
|
@ -301,13 +301,15 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
|||||||
public void secretInternalSegmentCancel() {
|
public void secretInternalSegmentCancel() {
|
||||||
queuePathEvent(PathEvent.CANCELED);
|
queuePathEvent(PathEvent.CANCELED);
|
||||||
synchronized (pathPlanLock) {
|
synchronized (pathPlanLock) {
|
||||||
|
if (current != null) {
|
||||||
current = null;
|
current = null;
|
||||||
next = null;
|
next = null;
|
||||||
}
|
|
||||||
baritone.getInputOverrideHandler().clearAllKeys();
|
baritone.getInputOverrideHandler().clearAllKeys();
|
||||||
getInProgress().ifPresent(AbstractNodeCostSearch::cancel);
|
getInProgress().ifPresent(AbstractNodeCostSearch::cancel);
|
||||||
baritone.getInputOverrideHandler().getBlockBreakHelper().stopBreakingBlock();
|
baritone.getInputOverrideHandler().getBlockBreakHelper().stopBreakingBlock();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void forceCancel() { // NOT exposed on public api
|
public void forceCancel() { // NOT exposed on public api
|
||||||
cancelEverything();
|
cancelEverything();
|
||||||
|
Loading…
Reference in New Issue
Block a user