Skip to content

Commit 7d7cbc3

Browse files
committed
isEmpty check after fluid checks in break checker
1 parent f4605a2 commit 7d7cbc3

File tree

1 file changed

+2
-2
lines changed
  • src/main/kotlin/com/lambda/interaction/construction/simulation/checks

1 file changed

+2
-2
lines changed

src/main/kotlin/com/lambda/interaction/construction/simulation/checks/BreakChecker.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ class BreakChecker @SimCheckerDsl private constructor(simInfo: SimInfo)
8585
}
8686

8787
private suspend fun AutomatedSafeContext.checkBreaks(): Boolean {
88-
if (state.isEmpty) return false
89-
9088
if (breakConfig.avoidSupporting) player.supportingBlockPos.getOrNull()?.let { support ->
9189
if (support != pos) return@let
9290
result(BreakResult.PlayerOnTop(pos, state))
@@ -98,6 +96,8 @@ class BreakChecker @SimCheckerDsl private constructor(simInfo: SimInfo)
9896
return simInfo(pos, state, TargetState.Solid(emptySet()))?.checkPlacements() ?: true
9997
}
10098

99+
if (state.isEmpty) return false
100+
101101
if (breakConfig.avoidLiquids && affectsFluids()) return true
102102

103103
val (swapStack, stackSelection) = getSwapStack() ?: return true

0 commit comments

Comments
 (0)