@@ -20,13 +20,15 @@ package com.lambda.module.modules.player
2020import com.lambda.interaction.construction.blueprint.TickingBlueprint.Companion.tickingBlueprint
2121import com.lambda.interaction.construction.verify.TargetState
2222import com.lambda.module.Module
23+ import com.lambda.module.modules.client.TaskFlowModule
2324import com.lambda.module.tag.ModuleTag
2425import com.lambda.task.RootTask.run
2526import com.lambda.task.Task
2627import com.lambda.task.tasks.BuildTask.Companion.build
2728import com.lambda.util.BaritoneUtils
2829import com.lambda.util.BlockUtils.blockPos
2930import com.lambda.util.BlockUtils.blockState
31+ import com.lambda.util.BlockUtils.isNotEmpty
3032import net.minecraft.util.math.BlockPos
3133
3234object Nuker : Module(
@@ -37,7 +39,7 @@ object Nuker : Module(
3739 private val height by setting(" Height" , 4 , 1 .. 8 , 1 )
3840 private val width by setting(" Width" , 4 , 1 .. 8 , 1 )
3941 private val flatten by setting(" Flatten" , true )
40- private val onlyBreakInstant by setting(" Only Break Instant" , false )
42+ private val instantOnly by setting(" Instant Only " , false )
4143 private val fillFloor by setting(" Fill Floor" , false )
4244 private val baritoneSelection by setting(" Baritone Selection" , false , " Restricts nuker to your baritone selection" )
4345
@@ -49,10 +51,9 @@ object Nuker : Module(
4951 val selection = BlockPos .iterateOutwards(player.blockPos, width, height, width)
5052 .asSequence()
5153 .map { it.blockPos }
52- .filter { ! world.isAir (it) }
54+ .filter { blockState (it).isNotEmpty }
5355 .filter { ! flatten || it.y >= player.blockPos.y }
54- .filter { ! onlyBreakInstant || blockState(it).getHardness(world, it) <= 1 }
55- .filter { blockState(it).getHardness(world, it) >= 0 }
56+ .filter { ! instantOnly || blockState(it).getHardness(world, it) <= TaskFlowModule .build.breaking.breakThreshold }
5657 .filter { pos ->
5758 if (! baritoneSelection) true
5859 else BaritoneUtils .primary.selectionManager.selections.any {
0 commit comments