@@ -11,7 +11,6 @@ import com.lambda.util.Communication.info
1111import com.lambda.util.player.MovementUtils.octant
1212import com.lambda.util.extension.Structure
1313import com.lambda.util.extension.moveY
14- import com.lambda.util.math.MathUtils.ceilToInt
1514import com.lambda.util.math.MathUtils.floorToInt
1615import com.lambda.util.math.VecUtils.rotateClockwise
1716import com.lambda.util.world.StructureUtils.generateDirectionalTube
@@ -20,7 +19,6 @@ import net.minecraft.util.math.BlockPos
2019import net.minecraft.util.math.Direction
2120import net.minecraft.util.math.EightWayDirection
2221import net.minecraft.util.math.Vec3i
23- import kotlin.math.roundToInt
2422
2523object HighwayTools : Module(
2624 name = " HighwayTools" ,
@@ -30,14 +28,14 @@ object HighwayTools : Module(
3028 private val height by setting(" Height" , 4 , 2 .. 10 , 1 )
3129 private val width by setting(" Width" , 6 , 1 .. 30 , 1 )
3230 private val pavement by setting(" Pavement" , Material .Block , description = " Material for the pavement" )
33- private val rimHeight by setting(" Pavement Rim Height" , 1 , 0 .. 6 , 1 ) { pavement != Material .Any }
34- private val cornerBlock by setting(" Corner" , Corner .None , description = " Include corner blocks in the highway" ) { pavement != Material .Any }
31+ private val rimHeight by setting(" Pavement Rim Height" , 1 , 0 .. 6 , 1 ) { pavement != Material .None }
32+ private val cornerBlock by setting(" Corner" , Corner .None , description = " Include corner blocks in the highway" ) { pavement != Material .None }
3533 private val pavementMaterial by setting(" Pavement Material" , Blocks .OBSIDIAN , description = " Material to build the highway with" ) { pavement == Material .Block }
36- private val floor by setting(" Floor" , Material .Any , description = " Material for the floor" )
34+ private val floor by setting(" Floor" , Material .None , description = " Material for the floor" )
3735 private val floorMaterial by setting(" Floor Material" , Blocks .NETHERRACK , description = " Material to build the floor with" ) { floor == Material .Block }
38- private val walls by setting(" Walls" , Material .Any , description = " Material for the walls" )
36+ private val walls by setting(" Walls" , Material .None , description = " Material for the walls" )
3937 private val wallMaterial by setting(" Wall Material" , Blocks .NETHERRACK , description = " Material to build the walls with" ) { walls == Material .Block }
40- private val ceiling by setting(" Ceiling" , Material .Any , description = " Material for the ceiling" )
38+ private val ceiling by setting(" Ceiling" , Material .None , description = " Material for the ceiling" )
4139 private val ceilingMaterial by setting(" Ceiling Material" , Blocks .OBSIDIAN , description = " Material to build the ceiling with" ) { ceiling == Material .Block }
4240 private val distance by setting(" Distance" , - 1 , - 1 .. 1000000 , 1 , description = " Distance to build the highway/tunnel (negative for infinite)" )
4341 private val sliceSize by setting(" Slice Size" , 3 , 1 .. 5 , 1 , description = " Number of slices to build at once" )
@@ -49,7 +47,7 @@ object HighwayTools : Module(
4947 private var runningTask: Task <* >? = null
5048
5149 enum class Material {
52- Any ,
50+ None ,
5351 Solid ,
5452 Block ,
5553 }
@@ -111,7 +109,7 @@ object HighwayTools : Module(
111109 0 ,
112110 ).associateWith { TargetState .Air }
113111
114- if (pavement != Material .Any ) {
112+ if (pavement != Material .None ) {
115113 structure + = generateDirectionalTube(
116114 orthogonal,
117115 width,
@@ -159,7 +157,7 @@ object HighwayTools : Module(
159157 }
160158 }
161159
162- if (ceiling != Material .Any ) {
160+ if (ceiling != Material .None ) {
163161 structure + = generateDirectionalTube(
164162 orthogonal,
165163 width,
@@ -169,7 +167,7 @@ object HighwayTools : Module(
169167 ).associateWith { target(ceiling, ceilingMaterial) }
170168 }
171169
172- if (walls != Material .Any ) {
170+ if (walls != Material .None ) {
173171 // Left wall
174172 structure + = generateDirectionalTube(
175173 orthogonal,
@@ -189,7 +187,7 @@ object HighwayTools : Module(
189187 ).associateWith { target(walls, wallMaterial) }
190188 }
191189
192- if (floor != Material .Any ) {
190+ if (floor != Material .None ) {
193191 structure + = generateDirectionalTube(
194192 orthogonal,
195193 width,
@@ -200,7 +198,7 @@ object HighwayTools : Module(
200198 }
201199
202200 val transformed = when {
203- pavement != Material .Any -> structure.moveY(- 1 )
201+ pavement != Material .None -> structure.moveY(- 1 )
204202 else -> structure
205203 }
206204
0 commit comments