Skip to content

Commit 87e30a3

Browse files
committed
Allow mining below player if support is provided
1 parent 720c120 commit 87e30a3

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

common/src/main/kotlin/com/lambda/interaction/construction/simulation/BuildSimulator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ object BuildSimulator {
280280
val aabb = Box(pBox.minX, pBox.minY - 1.0E-6, pBox.minZ, pBox.maxX, pBox.minY, pBox.maxZ)
281281
world.findSupportingBlockPos(player, aabb).orElse(null)?.let { support ->
282282
if (support != pos) return@let
283+
val belowSupport = support.down().blockState(world)
284+
if (belowSupport.isSolidSurface(world, support, player, Direction.UP)) return@let
283285
acc.add(BreakResult.PlayerOnTop(pos, state))
284286
return acc
285287
}

0 commit comments

Comments
 (0)