Skip to content

Commit 56ea1bd

Browse files
committed
only setblock to checked state on timeout if the block was not broken client side
1 parent 638a86c commit 56ea1bd

File tree

1 file changed

+5
-2
lines changed
  • common/src/main/kotlin/com/lambda/interaction/request/breaking

1 file changed

+5
-2
lines changed

common/src/main/kotlin/com/lambda/interaction/request/breaking/BreakManager.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ object BreakManager : RequestHandler<BreakRequest>(), PositionBlocking {
7777
TaskFlowModule.build.maxPendingInteractions, TaskFlowModule.build.interactionTimeout * 50L
7878
) {
7979
info("${it::class.simpleName} at ${it.context.expectedPos.toShortString()} timed out")
80-
mc.world?.setBlockState(it.context.expectedPos, it.context.checkedState)
80+
if (!it.broken && it.breakConfig.breakConfirmation != BreakConfirmationMode.AwaitThenBreak) {
81+
mc.world?.setBlockState(it.context.expectedPos, it.context.checkedState)
82+
}
8183
it.pendingInteractionsList.remove(it.context)
8284
}
8385

@@ -543,7 +545,8 @@ object BreakManager : RequestHandler<BreakRequest>(), PositionBlocking {
543545
var startedWithSecondary = false
544546

545547
@Volatile
546-
private var broken = false
548+
var broken = false
549+
private set
547550
private var item: ItemEntity? = null
548551

549552
val callbacksCompleted

0 commit comments

Comments
 (0)