Skip to content

Commit 76958bf

Browse files
committed
Bring back only below setting
1 parent 3bd584f commit 76958bf

File tree

1 file changed

+2
-1
lines changed
  • src/main/kotlin/com/lambda/module/modules/player

1 file changed

+2
-1
lines changed

src/main/kotlin/com/lambda/module/modules/player/Scaffold.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ object Scaffold : Module(
6161
}
6262

6363
private val bridgeRange by setting("Bridge Range", 5, 0..5, 1, "The range at which blocks can be placed to help build support for the player", unit = " blocks").group(Group.General)
64+
private val onlyBelow by setting("Only Below", true, "Restricts bridging to only below the player to avoid place spam if it's impossible to reach the supporting position") { bridgeRange > 0 }.group(Group.General)
6465
private val descend by setting("Descend", KeyCode.UNBOUND, "Lower the place position by one to allow the player to lower y level").group(Group.General)
6566
private val descendAmount by setting("Descend Amount", 1, 1..5, 1, "The amount to lower the place position by when descending", unit = " blocks") { descend != KeyCode.UNBOUND }.group(Group.General)
6667
private val buildConfig = BuildSettings(this, Group.Build)
@@ -104,7 +105,7 @@ object Scaffold : Module(
104105

105106
return BlockPos.iterateOutwards(beneath, bridgeRange, bridgeRange, bridgeRange)
106107
.asSequence()
107-
.filter { it.y <= beneath.y }
108+
.filter { !onlyBelow || it.y <= beneath.y }
108109
.filter { blockState(it).isReplaceable }
109110
.map { it.blockPos }
110111
.toList()

0 commit comments

Comments
 (0)