Skip to content

Commit c3ade02

Browse files
committed
dont call onCancel when abandoning as the break isnt actually cancelled, but kept going by the break manager itself if unsafeCancels is disabled
1 parent d7a1715 commit c3ade02

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,14 @@ object BreakManager : RequestHandler<BreakRequest>(
566566
if (isPrimary) {
567567
if (breaking) abortBreakPacket(world, interaction)
568568
nullify()
569+
request.onCancel?.invoke(context.blockPos)
569570
} else if (isSecondary) {
570-
if (breakConfig.unsafeCancels) makeRedundant()
571+
if (breakConfig.unsafeCancels) {
572+
makeRedundant()
573+
request.onCancel?.invoke(context.blockPos)
574+
}
571575
else abandoned = true
572576
}
573-
574-
request.onCancel?.invoke(context.blockPos)
575577
}
576578

577579
/**

0 commit comments

Comments
 (0)