Skip to content

Commit d564d26

Browse files
committed
Corner support blocks
1 parent 3a577cf commit d564d26

File tree

2 files changed

+29
-48
lines changed

2 files changed

+29
-48
lines changed

common/src/main/kotlin/com/lambda/config/groups/BuildSettings.kt

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,16 @@ class BuildSettings(
1212

1313
val page by c.setting("Build Page", Page.BREAK, "Current page", vis)
1414

15-
override val breakCoolDown by c.setting("Break Cooldown", 0, 0..1000, 1, "Delay between breaking blocks", " ms") {
16-
vis() && page == Page.BREAK
17-
}
18-
override val breakConfirmation by c.setting("Break Confirmation", false, "Wait for block break confirmation") {
19-
vis() && page == Page.BREAK
20-
}
21-
override val breakWeakBlocks by c.setting("Break Weak Blocks", false, "Break blocks that dont have structural integrity (e.g: grass)") {
22-
vis() && page == Page.BREAK
23-
}
24-
override val breaksPerTick by c.setting("Instant Breaks Per Tick", 10, 1..30, 1, "Maximum instant block breaks per tick") {
25-
vis() && page == Page.BREAK
26-
}
27-
override val rotateForBreak by c.setting("Rotate For Break", false, "Rotate towards block while breaking") {
28-
vis() && page == Page.BREAK
29-
}
15+
override val breakCoolDown by c.setting("Break Cooldown", 0, 0..1000, 1, "Delay between breaking blocks", " ms") { vis() && page == Page.BREAK }
16+
override val breakConfirmation by c.setting("Break Confirmation", false, "Wait for block break confirmation") { vis() && page == Page.BREAK }
17+
override val breakWeakBlocks by c.setting("Break Weak Blocks", false, "Break blocks that dont have structural integrity (e.g: grass)") { vis() && page == Page.BREAK }
18+
override val breaksPerTick by c.setting("Instant Breaks Per Tick", 10, 1..30, 1, "Maximum instant block breaks per tick") { vis() && page == Page.BREAK }
19+
override val rotateForBreak by c.setting("Rotate For Break", false, "Rotate towards block while breaking") { vis() && page == Page.BREAK }
3020

31-
override val placeCooldown by c.setting("Place Cooldown", 0, 0..1000, 1, "Delay between placing blocks", " ms") {
32-
vis() && page == Page.PLACE
33-
}
34-
override val placeConfirmation by c.setting("Place Confirmation", false, "Wait for block placement confirmation") {
35-
vis() && page == Page.PLACE
36-
}
37-
override val collectDrops by c.setting("Collect All Drops", false, "Collect all drops when breaking blocks") {
38-
vis() && page == Page.PLACE
39-
}
40-
override val rotateForPlace by c.setting("Rotate For Place", true, "Rotate towards block while placing") {
41-
vis() && page == Page.PLACE
42-
}
21+
override val placeCooldown by c.setting("Place Cooldown", 0, 0..1000, 1, "Delay between placing blocks", " ms") { vis() && page == Page.PLACE }
22+
override val placeConfirmation by c.setting("Place Confirmation", false, "Wait for block placement confirmation") { vis() && page == Page.PLACE }
23+
override val collectDrops by c.setting("Collect All Drops", false, "Collect all drops when breaking blocks") { vis() && page == Page.PLACE }
24+
override val rotateForPlace by c.setting("Rotate For Place", true, "Rotate towards block while placing") { vis() && page == Page.PLACE }
4325

44-
override val pathing by c.setting("Pathing", true, "Path to blocks") {
45-
vis() && page == Page.PATHING
46-
}
26+
override val pathing by c.setting("Pathing", true, "Path to blocks") { vis() && page == Page.PATHING }
4727
}

common/src/main/kotlin/com/lambda/module/modules/player/HighwayTools.kt

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import com.lambda.util.primitives.extension.Structure
1313
import com.lambda.util.world.StructureUtils.generateDirectionalTube
1414
import net.minecraft.block.Blocks
1515
import net.minecraft.util.math.BlockPos
16+
import net.minecraft.util.math.Direction
1617
import net.minecraft.util.math.EightWayDirection
1718
import net.minecraft.util.math.Vec3i
1819
import kotlin.math.roundToInt
@@ -139,26 +140,26 @@ object HighwayTools : Module(
139140
-center,
140141
-1,
141142
)
142-
143-
// Remove the left corner
144-
// structure += generateDirectionalTube(
145-
// orthogonal,
146-
// 1,
147-
// 1,
148-
// -center + width - 1,
149-
// -1,
150-
// ).associateWith { TargetState.Support(Direction.UP) }
151-
152-
// Remove the right corner
153-
// structure += generateDirectionalTube(
154-
// orthogonal,
155-
// 1,
156-
// 1,
157-
// -center,
158-
// -1,
159-
// ).associateWith { TargetState.Support(Direction.UP) }
160143
}
161144

145+
// Support for the left corner
146+
structure += generateDirectionalTube(
147+
orthogonal,
148+
1,
149+
1,
150+
-center + width - 1,
151+
-1,
152+
).associateWith { TargetState.Solid }
153+
154+
// Support for the right corner
155+
structure += generateDirectionalTube(
156+
orthogonal,
157+
1,
158+
1,
159+
-center,
160+
-1,
161+
).associateWith { TargetState.Solid }
162+
162163
return structure
163164
}
164165
}

0 commit comments

Comments
 (0)