Skip to content

Commit 428f86a

Browse files
committed
Ignore submerge of liquids out of bounds
1 parent 34925e5 commit 428f86a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,12 @@ object BuildSimulator {
737737
}
738738

739739
if (affectedFluids.isNotEmpty()) {
740+
val liquidOutOfBounds = affectedFluids.any { !world.worldBorder.contains(it.key) }
741+
if (liquidOutOfBounds) {
742+
acc.add(BuildResult.Ignored(pos))
743+
return acc
744+
}
745+
740746
affectedFluids.forEach { (liquidPos, liquidState) ->
741747
val submerge = checkPlaceResults(liquidPos, eye, preProcessing, TargetState.Solid, build.placing, interactionConfig, rotation, inventory)
742748
acc.add(BreakResult.Submerge(liquidPos, liquidState, submerge))

0 commit comments

Comments
 (0)