From 18d3c4c2bd4b7ae57c9b801655132b5ebcb0c899 Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:00:08 -0700 Subject: [PATCH] align rightClickSpeed setting with actual delay --- src/main/java/baritone/utils/BlockPlaceHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/utils/BlockPlaceHelper.java b/src/main/java/baritone/utils/BlockPlaceHelper.java index 93b0c4408..ca8d50523 100644 --- a/src/main/java/baritone/utils/BlockPlaceHelper.java +++ b/src/main/java/baritone/utils/BlockPlaceHelper.java @@ -25,6 +25,8 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; public class BlockPlaceHelper { + // base ticks between places caused by tick logic + private static final int BASE_PLACE_DELAY = 1; private final IPlayerContext ctx; private int rightClickTimer; @@ -42,7 +44,7 @@ public class BlockPlaceHelper { if (!rightClickRequested || ctx.player().isHandsBusy() || mouseOver == null || mouseOver.getType() != HitResult.Type.BLOCK) { return; } - rightClickTimer = Baritone.settings().rightClickSpeed.value; + rightClickTimer = Baritone.settings().rightClickSpeed.value - BASE_PLACE_DELAY; for (InteractionHand hand : InteractionHand.values()) { if (ctx.playerController().processRightClickBlock(ctx.player(), ctx.world(), hand, (BlockHitResult) mouseOver) == InteractionResult.SUCCESS) { ctx.player().swing(hand);