File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/main/kotlin/com/lambda/interaction/request/breaking Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,9 @@ object BreakManager : RequestHandler<BreakRequest>(
176176 listen<TickEvent .Post >(priority = Int .MIN_VALUE ) {
177177 if (! swappedThisTick) {
178178 currentStack = player.mainHandStack
179+ heldTicks++
179180 }
180181 swappedThisTick = false
181- heldTicks++
182182 if (breakCooldown > 0 ) {
183183 breakCooldown--
184184 }
@@ -430,8 +430,11 @@ object BreakManager : RequestHandler<BreakRequest>(
430430 val minSwapTicks = max(info.swapInfo.minKeepTicks, last.swapInfo.minKeepTicks)
431431 if (! info.context.requestSwap(info.request, minSwapTicks))
432432 return false
433- if (minSwapTicks > 0 )
433+ if (minSwapTicks > 0 ) {
434+ val alreadySwapped = swappedThisTick
434435 currentStack = info.swapStack
436+ if (! alreadySwapped) heldTicks++
437+ }
435438 }
436439 }
437440 }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ data class SwapInfo(
3333 val minKeepTicks : Int = 0 ,
3434) {
3535 val canCompleteBreak
36- get() = ( BreakManager .heldTicks + 1 ) >= if (type == Primary || type == Rebreak ) breakConfig.serverSwapTicks
36+ get() = BreakManager .heldTicks >= if (type == Primary || type == Rebreak ) breakConfig.serverSwapTicks
3737 else breakConfig.serverSwapTicks.coerceAtLeast(3 )
3838
3939 companion object {
You can’t perform that action at this time.
0 commit comments