File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/kotlin/com/lambda
interaction/construction/simulation/checks Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,8 @@ class BreakChecker @SimCheckerDsl private constructor(simInfo: SimInfo)
119119 }
120120
121121 private suspend fun AutomatedSafeContext.checkBreaks (): Boolean {
122+ if (state.isEmpty) return false
123+
122124 if (breakConfig.avoidSupporting) player.supportingBlockPos.getOrNull()?.let { support ->
123125 if (support != pos) return @let
124126 result(BreakResult .PlayerOnTop (pos, state))
@@ -130,8 +132,6 @@ class BreakChecker @SimCheckerDsl private constructor(simInfo: SimInfo)
130132 return simInfo(pos, state, TargetState .Solid (emptySet()))?.checkPlacements() ? : true
131133 }
132134
133- if (state.isEmpty) return false
134-
135135 if (breakConfig.avoidLiquids && affectsFluids()) return true
136136
137137 val swapStack = getSwapStack() ? : return true
Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ object BlockUtils {
305305 return speedMultiplier
306306 }
307307
308- val BlockState .isEmpty get() = matches(emptyState)
308+ val BlockState .isEmpty get() = isAir || matches(emptyState)
309309 val BlockState .isNotEmpty get() = ! isEmpty
310310 val BlockState .hasFluid get() = ! fluidState.isEmpty
311311 val BlockState .emptyState: BlockState get() = fluidState.blockState
You can’t perform that action at this time.
0 commit comments