From d4eac30e513cfb157b35b05b2c4793969e5ad42d Mon Sep 17 00:00:00 2001 From: beanbag44 <107891830+beanbag44@users.noreply.github.com> Date: Wed, 18 Mar 2026 16:42:46 +0000 Subject: [PATCH 1/2] world category --- .../com/lambda/mixin/render/CameraMixin.java | 2 +- .../mixin/render/WorldRendererMixin.java | 2 +- .../modules/{player => combat}/AutoArmor.kt | 6 +- .../modules/{player => render}/Freecam.kt | 12 +- .../modules/{player => world}/AirPlace.kt | 7 +- .../modules/{player => world}/AutoPortal.kt | 33 ++-- .../modules/{player => world}/AutoSign.kt | 6 +- .../{player => world}/AutoVillagerCycle.kt | 15 +- .../modules/{player => world}/HighwayTools.kt | 167 +++++++++--------- .../{player => world}/MapDownloader.kt | 6 +- .../module/modules/{player => world}/Nuker.kt | 8 +- .../modules/{player => world}/Printer.kt | 4 +- .../modules/{player => world}/Scaffold.kt | 7 +- .../modules/{player => world}/WorldEater.kt | 10 +- .../kotlin/com/lambda/module/tag/ModuleTag.kt | 3 +- 15 files changed, 140 insertions(+), 148 deletions(-) rename src/main/kotlin/com/lambda/module/modules/{player => combat}/AutoArmor.kt (98%) rename src/main/kotlin/com/lambda/module/modules/{player => render}/Freecam.kt (98%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/AirPlace.kt (96%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/AutoPortal.kt (90%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/AutoSign.kt (98%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/AutoVillagerCycle.kt (95%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/HighwayTools.kt (71%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/MapDownloader.kt (97%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/Nuker.kt (97%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/Printer.kt (97%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/Scaffold.kt (97%) rename src/main/kotlin/com/lambda/module/modules/{player => world}/WorldEater.kt (92%) diff --git a/src/main/java/com/lambda/mixin/render/CameraMixin.java b/src/main/java/com/lambda/mixin/render/CameraMixin.java index 925ebf882..20c91d035 100644 --- a/src/main/java/com/lambda/mixin/render/CameraMixin.java +++ b/src/main/java/com/lambda/mixin/render/CameraMixin.java @@ -18,7 +18,7 @@ package com.lambda.mixin.render; import com.lambda.interaction.managers.rotating.RotationManager; -import com.lambda.module.modules.player.Freecam; +import com.lambda.module.modules.render.Freecam; import com.lambda.module.modules.render.CameraTweaks; import com.lambda.module.modules.render.FreeLook; import com.lambda.module.modules.render.NoRender; diff --git a/src/main/java/com/lambda/mixin/render/WorldRendererMixin.java b/src/main/java/com/lambda/mixin/render/WorldRendererMixin.java index 08de03382..f614aec49 100644 --- a/src/main/java/com/lambda/mixin/render/WorldRendererMixin.java +++ b/src/main/java/com/lambda/mixin/render/WorldRendererMixin.java @@ -22,7 +22,7 @@ import com.lambda.event.events.RenderEvent; import com.lambda.graphics.RenderMain; import com.lambda.graphics.outline.OutlineManager; -import com.lambda.module.modules.player.Freecam; +import com.lambda.module.modules.render.Freecam; import com.lambda.module.modules.render.CameraTweaks; import com.lambda.module.modules.render.NoRender; import net.minecraft.client.world.ClientWorld; diff --git a/src/main/kotlin/com/lambda/module/modules/player/AutoArmor.kt b/src/main/kotlin/com/lambda/module/modules/combat/AutoArmor.kt similarity index 98% rename from src/main/kotlin/com/lambda/module/modules/player/AutoArmor.kt rename to src/main/kotlin/com/lambda/module/modules/combat/AutoArmor.kt index 5a4bdd923..c80126edf 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/AutoArmor.kt +++ b/src/main/kotlin/com/lambda/module/modules/combat/AutoArmor.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.combat import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits @@ -43,10 +43,10 @@ import net.minecraft.screen.slot.Slot object AutoArmor : Module( name = "AutoArmor", description = "Automatically equips armor", - tag = ModuleTag.COMBAT + tag = ModuleTag.Companion.COMBAT ) { private var elytraPriority by setting("Elytra Priority", true, "Prioritizes elytra's over other armor pieces in the chest slot") - private val toggleElytraPriority by setting("Toggle Elytra Priority", Bind.EMPTY) + private val toggleElytraPriority by setting("Toggle Elytra Priority", Bind.Companion.EMPTY) .onPress { elytraPriority = !elytraPriority } private val minDurabilityPercentage by setting("Min Durability", 5, 0..100, 1, "Minimum durability percentage before being swapped for a new piece", "%") private val headProtection by setting("Preferred Head Protection", Protection.Protection) diff --git a/src/main/kotlin/com/lambda/module/modules/player/Freecam.kt b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt similarity index 98% rename from src/main/kotlin/com/lambda/module/modules/player/Freecam.kt rename to src/main/kotlin/com/lambda/module/modules/render/Freecam.kt index 29043e980..de538d66f 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/Freecam.kt +++ b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt @@ -15,9 +15,9 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.render -import com.lambda.Lambda.mc +import com.lambda.Lambda import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.context.SafeContext @@ -91,7 +91,7 @@ object Freecam : Module( private var position: Vec3d = Vec3d.ZERO private val lerpPos: Vec3d get() { - val tickProgress = mc.gameRenderer.camera.lastTickProgress + val tickProgress = Lambda.mc.gameRenderer.camera.lastTickProgress return prevPosition.interpolate(tickProgress, position) } @@ -110,7 +110,7 @@ object Freecam : Module( } } } - mc.gameRenderer.apply { + Lambda.mc.gameRenderer.apply { camera.setRotation(rotation.yawF, rotation.pitchF) camera.setPos(lerpPos.x, lerpPos.y, lerpPos.z) } @@ -173,7 +173,7 @@ object Freecam : Module( var moveVec = movementVector(moveDir, input.verticalMovement) * speed * sprintModifier if (!input.isInputting) moveVec *= Vec3d(0.0, 1.0, 0.0) // Apply movement - velocity += moveVec + velocity + moveVec velocity *= 0.6 // Update position prevPosition = position @@ -247,4 +247,4 @@ object Freecam : Module( val players = world.players.filter { it !is ClientPlayerEntity } return players.minByOrNull { it.eyePos.squaredDistanceTo(position) } } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/lambda/module/modules/player/AirPlace.kt b/src/main/kotlin/com/lambda/module/modules/world/AirPlace.kt similarity index 96% rename from src/main/kotlin/com/lambda/module/modules/player/AirPlace.kt rename to src/main/kotlin/com/lambda/module/modules/world/AirPlace.kt index 0d4d76543..26629f753 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/AirPlace.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AirPlace.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits @@ -29,7 +29,6 @@ import com.lambda.graphics.mc.renderer.TickedRenderer.Companion.tickedRenderer import com.lambda.interaction.construction.simulation.BuildSimulator.simulate import com.lambda.interaction.construction.simulation.context.BuildContext import com.lambda.interaction.construction.verify.TargetState -import com.lambda.interaction.managers.interacting.InteractConfig import com.lambda.interaction.managers.interacting.InteractRequest.Companion.interactRequest import com.lambda.interaction.managers.rotating.Rotation.Companion.rotation import com.lambda.module.Module @@ -46,14 +45,12 @@ import net.minecraft.util.math.BlockPos import net.minecraft.util.math.Box import net.minecraft.world.RaycastContext import org.lwjgl.glfw.GLFW -import java.awt.Color import java.util.concurrent.ConcurrentLinkedQueue -import kotlin.invoke object AirPlace : Module( name = "AirPlace", description = "Allows placing blocks in air", - tag = ModuleTag.PLAYER + tag = ModuleTag.WORLD ) { enum class Group(override val displayName: String) : NamedEnum { General("General"), diff --git a/src/main/kotlin/com/lambda/module/modules/player/AutoPortal.kt b/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt similarity index 90% rename from src/main/kotlin/com/lambda/module/modules/player/AutoPortal.kt rename to src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt index 9bbdb79de..562d7e969 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/AutoPortal.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import baritone.api.pathing.goals.GoalBlock import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig @@ -27,18 +27,15 @@ import com.lambda.config.settings.complex.KeybindSetting.Companion.onRelease import com.lambda.context.SafeContext import com.lambda.event.events.TickEvent import com.lambda.event.listener.SafeListener.Companion.listen +import com.lambda.graphics.mc.BoxBuilder import com.lambda.graphics.mc.renderer.ImmediateRenderer.Companion.immediateRenderer -import com.lambda.graphics.util.DirectionMask.buildSideMesh +import com.lambda.graphics.util.DirectionMask import com.lambda.interaction.BaritoneManager import com.lambda.interaction.construction.verify.TargetState import com.lambda.interaction.managers.hotbar.HotbarRequest import com.lambda.interaction.managers.inventory.InventoryRequest.Companion.inventoryRequest -import com.lambda.interaction.material.StackSelection.Companion.selectStack +import com.lambda.interaction.material.StackSelection import com.lambda.module.Module -import com.lambda.module.modules.player.AutoPortal.PosHandler.currAnchorPos -import com.lambda.module.modules.player.AutoPortal.PosHandler.obiPositions -import com.lambda.module.modules.player.AutoPortal.PosHandler.portalPositions -import com.lambda.module.modules.player.AutoPortal.PosHandler.prevAnchorPos import com.lambda.module.tag.ModuleTag import com.lambda.task.RootTask.run import com.lambda.task.Task @@ -70,22 +67,22 @@ import net.minecraft.util.math.Vec3d object AutoPortal : Module( name = "AutoPortal", description = "Automatically places and lights a nether portal", - tag = ModuleTag.PLAYER + tag = ModuleTag.WORLD ) { private enum class Group(override val displayName: String) : NamedEnum { General("General"), Render("Render") } - private val previewPlace by setting("Preview Place", Bind.EMPTY, "The keybind to preview the portal placement and subsequentially place the portal").group(Group.General) + private val previewPlace by setting("Preview Place", Bind.Companion.EMPTY, "The keybind to preview the portal placement and subsequentially place the portal").group(Group.General) .onPress { preview = true } .onRelease { preview = false buildTask?.cancel() val posStateMap = - obiPositions.associateWith { + PosHandler.obiPositions.associateWith { TargetState.Block(Blocks.OBSIDIAN) - } + portalPositions.associateWith { + } + PosHandler.portalPositions.associateWith { TargetState.Air } //ToDo: implement non placement interactions like flint and steel in the build sim, in turn, simulating portal lighting too. @@ -95,7 +92,7 @@ object AutoPortal : Module( buildTask = posStateMap .build() .thenOrNull { - if (light) LightTask(currAnchorPos.up(), walkIn) + if (light) LightTask(PosHandler.currAnchorPos.up(), walkIn) else null } .finally { @@ -144,14 +141,14 @@ object AutoPortal : Module( if (!renders || !preview) return@immediateRenderer with (safeContext) { val obiColor = blockColor(Blocks.OBSIDIAN.defaultState, BlockPos.ORIGIN) - obiPositions + PosHandler.obiPositions .map { val box = Box(it).let { box -> if (interpolate) { val offset = lerp( 1.0 - mc.tickDelta, Vec3d.ZERO, - prevAnchorPos.subtract(currAnchorPos).vec3d + PosHandler.prevAnchorPos.subtract(PosHandler.currAnchorPos).vec3d ) box.offset(offset) } else box @@ -161,7 +158,7 @@ object AutoPortal : Module( .forEach { posAndBox -> box(posAndBox.second, outlineConfig) { colors(obiColor.setAlpha(fillAlpha), obiColor) - hideSides(buildSideMesh(posAndBox.first) { it in obiPositions }.inv()) + hideSides(DirectionMask.buildSideMesh(posAndBox.first) { it in PosHandler.obiPositions }.inv()) } } } @@ -186,7 +183,7 @@ object AutoPortal : Module( context(safeContext: SafeContext) fun tick() = with(safeContext) { - if (!previewPlace.isSatisfied()) return@with + if (!preview) return@with val offsetDir = player.horizontalFacing val baseAnchorPos = player.blockPos @@ -291,7 +288,7 @@ object AutoPortal : Module( } swapPacket() if (walkIn) { - BaritoneManager.setGoalAndPath(GoalBlock(currAnchorPos.up())) + BaritoneManager.setGoalAndPath(GoalBlock(PosHandler.currAnchorPos.up())) } success() } @@ -313,7 +310,7 @@ object AutoPortal : Module( return } - val sel = selectStack(1) { isItem() } + val sel = StackSelection.selectStack(1) { isItem() } val hotbarStack = sel.filterSlots(player.hotbarSlots).firstOrNull() if (hotbarStack != null) { diff --git a/src/main/kotlin/com/lambda/module/modules/player/AutoSign.kt b/src/main/kotlin/com/lambda/module/modules/world/AutoSign.kt similarity index 98% rename from src/main/kotlin/com/lambda/module/modules/player/AutoSign.kt rename to src/main/kotlin/com/lambda/module/modules/world/AutoSign.kt index 29514ab71..0d22c7513 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/AutoSign.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AutoSign.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.ibm.icu.util.Calendar import com.lambda.event.events.GuiEvent @@ -30,7 +30,7 @@ import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen import net.minecraft.client.gui.screen.ingame.HangingSignEditScreen import net.minecraft.client.gui.screen.ingame.SignEditScreen import net.minecraft.network.packet.c2s.play.UpdateSignC2SPacket -import java.util.* +import java.util.Date @Suppress("unused") object AutoSign : Module( @@ -48,7 +48,7 @@ object AutoSign : Module( | - Minute (00-59) | - Second (00-59) """.trimMargin(), - tag = ModuleTag.PLAYER + tag = ModuleTag.WORLD ) { var autoWrite by setting("Auto Write", true) var line1 by setting("Line 1", "Welcome to Lambda!") { autoWrite } diff --git a/src/main/kotlin/com/lambda/module/modules/player/AutoVillagerCycle.kt b/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt similarity index 95% rename from src/main/kotlin/com/lambda/module/modules/player/AutoVillagerCycle.kt rename to src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt index eb487b103..e150c210a 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/AutoVillagerCycle.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits @@ -32,7 +32,7 @@ import com.lambda.interaction.managers.rotating.IRotationRequest.Companion.rotat import com.lambda.interaction.managers.rotating.visibilty.lookAtEntity import com.lambda.module.Module import com.lambda.module.tag.ModuleTag -import com.lambda.sound.SoundManager.playSound +import com.lambda.sound.SoundManager import com.lambda.task.RootTask.run import com.lambda.task.Task import com.lambda.task.tasks.BuildTask.Companion.build @@ -41,12 +41,10 @@ import com.lambda.util.BlockUtils.blockState import com.lambda.util.BlockUtils.isEmpty import com.lambda.util.Communication.info import com.lambda.util.Communication.logError -import com.lambda.util.EnchantmentUtils.forEachEnchantment import com.lambda.util.NamedEnum import com.lambda.util.world.closestEntity import net.minecraft.block.Blocks import net.minecraft.component.DataComponentTypes -import net.minecraft.component.type.ItemEnchantmentsComponent import net.minecraft.enchantment.Enchantment import net.minecraft.entity.passive.VillagerEntity import net.minecraft.item.ItemStack @@ -58,11 +56,10 @@ import net.minecraft.util.Hand import net.minecraft.util.hit.EntityHitResult import net.minecraft.util.math.BlockPos - object AutoVillagerCycle : Module( name = "AutoVillagerCycle", description = "Automatically cycles librarian villagers with lecterns until a desired enchanted book is found", - tag = ModuleTag.PLAYER + tag = ModuleTag.WORLD ) { private enum class Group(override val displayName: String) : NamedEnum { General("General"), @@ -76,7 +73,7 @@ object AutoVillagerCycle : Module( private val interactDelay by setting("Interact Delay", 20, 1..40, 1, "Ticks to wait before interacting with the villager", " ticks").group(Group.General) private val breakDelay by setting("Break Delay", 5, 1..20, 1, "Ticks to wait after breaking the lectern", " ticks").group(Group.General) private val searchRange by setting("Search Range", 5.0, 1.0..10.0, 0.5, "Range to search for nearby villagers", " blocks").group(Group.General) - private val startCyclingBind by setting("Start Cycling", Bind.EMPTY, "Press to start/stop cycling").group(Group.General) + private val startCyclingBind by setting("Start Cycling", Bind.Companion.EMPTY, "Press to start/stop cycling").group(Group.General) .onPress { if (cycleState != CycleState.Idle) { info("Stopped villager cycling.") @@ -97,7 +94,7 @@ object AutoVillagerCycle : Module( private var buildTask: Task<*>? = null init { - setDefaultAutomationConfig() { + setDefaultAutomationConfig { applyEdits { hideAllGroupsExcept(rotationConfig, inventoryConfig, breakConfig, interactConfig, buildConfig) } @@ -167,7 +164,7 @@ object AutoVillagerCycle : Module( findDesiredEnchantment(sellItem)?.let { info("Found desired enchantment: ${it.description().string}!") - playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP) + SoundManager.playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP) switchState(CycleState.Idle) return@listen } diff --git a/src/main/kotlin/com/lambda/module/modules/player/HighwayTools.kt b/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt similarity index 71% rename from src/main/kotlin/com/lambda/module/modules/player/HighwayTools.kt rename to src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt index 7ea5d6fe1..03b7f66d9 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/HighwayTools.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.interaction.BaritoneManager -import com.lambda.interaction.construction.blueprint.Blueprint.Companion.emptyStructure -import com.lambda.interaction.construction.blueprint.PropagatingBlueprint.Companion.propagatingBlueprint +import com.lambda.interaction.construction.blueprint.Blueprint +import com.lambda.interaction.construction.blueprint.PropagatingBlueprint import com.lambda.interaction.construction.verify.TargetState import com.lambda.module.Module import com.lambda.module.tag.ModuleTag @@ -36,7 +36,8 @@ import com.lambda.util.extension.moveY import com.lambda.util.math.MathUtils.floorToInt import com.lambda.util.math.rotateClockwise import com.lambda.util.player.MovementUtils.octant -import com.lambda.util.world.StructureUtils.generateDirectionalTube +import com.lambda.util.world.StructureUtils +import net.minecraft.block.Block import net.minecraft.block.Blocks import net.minecraft.util.math.BlockPos import net.minecraft.util.math.Direction @@ -46,7 +47,7 @@ import net.minecraft.util.math.Vec3i object HighwayTools : Module( name = "HighwayTools", description = "Auto highway builder", - tag = ModuleTag.PLAYER, + tag = ModuleTag.WORLD, ) { private val height by setting("Height", 4, 2..10, 1) private val width by setting("Width", 6, 1..30, 1) @@ -112,22 +113,22 @@ object HighwayTools : Module( } private fun buildHighway() { - runningTask = propagatingBlueprint { - if (distance !in 0..distanceMoved) { - var structure = emptyStructure() - val slice = generateSlice() - repeat(sliceSize) { - structure = structure.plus(slice.map { it.key.add(currentPos) to it.value }) - val vec = Vec3i(octant.offsetX, 0, octant.offsetZ) - currentPos = currentPos.add(vec) - } - distanceMoved += sliceSize - structure - } else { - this@HighwayTools.info("Highway built") - disable() - emptyStructure() - } + runningTask = PropagatingBlueprint.propagatingBlueprint { + if (distance !in 0..distanceMoved) { + var structure = Blueprint.emptyStructure() + val slice = generateSlice() + repeat(sliceSize) { + structure = structure.plus(slice.map { it.key.add(currentPos) to it.value }) + val vec = Vec3i(octant.offsetX, 0, octant.offsetZ) + currentPos = currentPos.add(vec) + } + distanceMoved += sliceSize + structure + } else { + this@HighwayTools.info("Highway built") + disable() + Blueprint.emptyStructure() + } }.build(collectDrops = buildConfig.collectDrops, lifeMaintenance = true) .run() } @@ -138,100 +139,100 @@ object HighwayTools : Module( val center = (width / 2.0).floorToInt() // Hole - structure += generateDirectionalTube( - orthogonal, - width, - height, - -center, - 0, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + width, + height, + -center, + 0, ).associateWith { TargetState.Air } if (pavement != Material.None) { - structure += generateDirectionalTube( - orthogonal, - width, - 1, - -center, - 0, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + width, + 1, + -center, + 0, ).associateWith { target(pavement, pavementMaterial) } // Left rim - structure += generateDirectionalTube( - orthogonal, - 1, - rimHeight, - -center + width - 1, - 1, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + rimHeight, + -center + width - 1, + 1, ).associateWith { target(pavement, pavementMaterial) } // Right rim - structure += generateDirectionalTube( - orthogonal, - 1, - rimHeight, - -center, - 1, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + rimHeight, + -center, + 1, ).associateWith { target(pavement, pavementMaterial) } if (cornerBlock == Corner.None && rimHeight > 0) { // Support for the left rim - structure += generateDirectionalTube( - orthogonal, - 1, - 1, - -center + width - 1, - 0, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + 1, + -center + width - 1, + 0, ).associateWith { TargetState.Support(Direction.UP) } // Support for the right rim - structure += generateDirectionalTube( - orthogonal, - 1, - 1, - -center, - 0, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + 1, + -center, + 0, ).associateWith { TargetState.Support(Direction.UP) } } } if (ceiling != Material.None) { - structure += generateDirectionalTube( - orthogonal, - width, - 1, - -center, - height, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + width, + 1, + -center, + height, ).associateWith { target(ceiling, ceilingMaterial) } } val wallElevation = if (pavement != Material.None) rimHeight else 0 + if (pavement != Material.None) 1 else 0 if (rightWall != Material.None) { - structure += generateDirectionalTube( - orthogonal, - 1, - height - wallElevation, - -center + width, - wallElevation, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + height - wallElevation, + -center + width, + wallElevation, ).associateWith { target(rightWall, wallMaterial) } } if (leftWall != Material.None) { - structure += generateDirectionalTube( - orthogonal, - 1, - height - wallElevation, - -center - 1, - wallElevation, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + 1, + height - wallElevation, + -center - 1, + wallElevation, ).associateWith { target(leftWall, wallMaterial) } } if (floor != Material.None) { - structure += generateDirectionalTube( - orthogonal, - width, - 1, - -center, - -1, + structure += StructureUtils.generateDirectionalTube( + orthogonal, + width, + 1, + -center, + -1, ).associateWith { target(floor, floorMaterial) } } @@ -243,10 +244,10 @@ object HighwayTools : Module( return transformed } - private fun target(target: Material, material: net.minecraft.block.Block) = + private fun target(target: Material, material: Block) = when (target) { Material.Solid -> TargetState.Solid(replaceableSolids) Material.Block -> TargetState.Block(material) else -> throw IllegalStateException("Invalid material") } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/lambda/module/modules/player/MapDownloader.kt b/src/main/kotlin/com/lambda/module/modules/world/MapDownloader.kt similarity index 97% rename from src/main/kotlin/com/lambda/module/modules/player/MapDownloader.kt rename to src/main/kotlin/com/lambda/module/modules/world/MapDownloader.kt index 52edef17b..8ac8bc437 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/MapDownloader.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/MapDownloader.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.event.events.TickEvent import com.lambda.event.listener.SafeListener.Companion.listen @@ -36,7 +36,7 @@ import javax.imageio.ImageIO object MapDownloader : Module( name = "MapDownloader", description = "Save map data to your computer", - tag = ModuleTag.PLAYER, + tag = ModuleTag.WORLD, ) { init { listen { @@ -78,4 +78,4 @@ object MapDownloader : Module( return image } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/lambda/module/modules/player/Nuker.kt b/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt similarity index 97% rename from src/main/kotlin/com/lambda/module/modules/player/Nuker.kt rename to src/main/kotlin/com/lambda/module/modules/world/Nuker.kt index 3b16017d6..aff5936f2 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/Nuker.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt @@ -15,13 +15,13 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.context.SafeContext import com.lambda.interaction.BaritoneManager -import com.lambda.interaction.construction.blueprint.TickingBlueprint.Companion.tickingBlueprint +import com.lambda.interaction.construction.blueprint.TickingBlueprint import com.lambda.interaction.construction.verify.TargetState import com.lambda.module.Module import com.lambda.module.tag.ModuleTag @@ -39,7 +39,7 @@ import net.minecraft.util.math.Direction object Nuker : Module( name = "Nuker", description = "Breaks blocks around you", - tag = ModuleTag.PLAYER, + tag = ModuleTag.WORLD, autoDisable = true ) { private val height by setting("Height", 6, 1..8, 1) @@ -64,7 +64,7 @@ object Nuker : Module( } onEnable { - task = tickingBlueprint { + task = TickingBlueprint.tickingBlueprint { if (onGround && !player.isOnGround) return@tickingBlueprint emptyMap() val selection = BlockPos.iterateOutwards(player.blockPos, width, height, width) diff --git a/src/main/kotlin/com/lambda/module/modules/player/Printer.kt b/src/main/kotlin/com/lambda/module/modules/world/Printer.kt similarity index 97% rename from src/main/kotlin/com/lambda/module/modules/player/Printer.kt rename to src/main/kotlin/com/lambda/module/modules/world/Printer.kt index 3ba231c6f..88878b496 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/Printer.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/Printer.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.interaction.construction.blueprint.TickingBlueprint @@ -34,7 +34,7 @@ import net.minecraft.util.math.BlockPos object Printer : Module( name = "Printer", description = "Automatically prints schematics", - tag = ModuleTag.PLAYER + tag = ModuleTag.WORLD ) { private val range by setting("Range", 5, 1..7, 1, description = "The range around the player to check for blocks to print") private val air by setting("Air", false, description = "Consider breaking blocks in the world that are air in the schematic.\nNote: Breaking can also be disabled in the Automation Config.") diff --git a/src/main/kotlin/com/lambda/module/modules/player/Scaffold.kt b/src/main/kotlin/com/lambda/module/modules/world/Scaffold.kt similarity index 97% rename from src/main/kotlin/com/lambda/module/modules/player/Scaffold.kt rename to src/main/kotlin/com/lambda/module/modules/world/Scaffold.kt index cc5342bcb..066374cde 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/Scaffold.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/Scaffold.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits @@ -33,14 +33,13 @@ import com.lambda.threading.runSafeAutomated import com.lambda.util.BlockUtils.blockPos import com.lambda.util.BlockUtils.blockState import com.lambda.util.InputUtils.isSatisfied -import com.lambda.util.KeyCode import net.minecraft.util.math.BlockPos import java.util.concurrent.ConcurrentLinkedQueue object Scaffold : Module( name = "Scaffold", description = "Places blocks under the player", - tag = ModuleTag.PLAYER, + tag = ModuleTag.WORLD, ) { 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") 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 } @@ -107,4 +106,4 @@ object Scaffold : Module( .map { it.blockPos } .toList() } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/lambda/module/modules/player/WorldEater.kt b/src/main/kotlin/com/lambda/module/modules/world/WorldEater.kt similarity index 92% rename from src/main/kotlin/com/lambda/module/modules/player/WorldEater.kt rename to src/main/kotlin/com/lambda/module/modules/world/WorldEater.kt index db9a405cf..1de112cbc 100644 --- a/src/main/kotlin/com/lambda/module/modules/player/WorldEater.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/WorldEater.kt @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -package com.lambda.module.modules.player +package com.lambda.module.modules.world import com.lambda.graphics.mc.renderer.TickedRenderer.Companion.tickedRenderer import com.lambda.interaction.BaritoneManager @@ -35,9 +35,9 @@ import java.awt.Color object WorldEater : Module( name = "WorldEater", description = "Eats the world", - tag = ModuleTag.PLAYER, + tag = ModuleTag.WORLD, ) { - // private val height by setting("Height", 4, 1..10, 1) +// private val height by setting("Height", 4, 1..10, 1) // private val width by setting("Width", 6, 1..30, 1) private val pos1 by setting("Position 1", BlockPos(351, 104, 103)) private val pos2 by setting("Position 2", BlockPos(361, 70, 113)) @@ -52,7 +52,7 @@ object WorldEater : Module( val layerRanges = (area.minY..area.maxY step layerSize).reversed() work.addAll(layerRanges.mapNotNull { y -> if (y == area.minY) return@mapNotNull null - BlockBox(area.minX, y - layerSize, area.minZ, area.maxX, y, area.maxZ) + BlockBox(area.minX, y - layerSize, area.minZ, area.maxX, y, area.maxZ) }) buildLayer() @@ -84,4 +84,4 @@ object WorldEater : Module( }.run() } ?: disable() } -} +} \ No newline at end of file diff --git a/src/main/kotlin/com/lambda/module/tag/ModuleTag.kt b/src/main/kotlin/com/lambda/module/tag/ModuleTag.kt index 71b1dbe3d..caab346cc 100644 --- a/src/main/kotlin/com/lambda/module/tag/ModuleTag.kt +++ b/src/main/kotlin/com/lambda/module/tag/ModuleTag.kt @@ -40,13 +40,14 @@ data class ModuleTag(override val name: String) : Nameable { val MOVEMENT = ModuleTag("Movement") val RENDER = ModuleTag("Render") val PLAYER = ModuleTag("Player") + val WORLD = ModuleTag("World") val CHAT = ModuleTag("Chat") val CLIENT = ModuleTag("Client") val NETWORK = ModuleTag("Network") val DEBUG = ModuleTag("Debug") val HUD = ModuleTag("Hud") - val defaults = setOf(COMBAT, MOVEMENT, RENDER, PLAYER, NETWORK, CHAT, CLIENT, HUD) + val defaults = setOf(COMBAT, MOVEMENT, RENDER, PLAYER, WORLD, NETWORK, CHAT, CLIENT, HUD) val shownTags = defaults.toMutableSet() From a3a0d596020b823b55a11efa3bcc6b3d7b015a2f Mon Sep 17 00:00:00 2001 From: beanbag44 <107891830+beanbag44@users.noreply.github.com> Date: Wed, 18 Mar 2026 16:52:39 +0000 Subject: [PATCH 2/2] cleanup --- .../lambda/module/modules/render/Freecam.kt | 7 ++-- .../lambda/module/modules/world/AutoPortal.kt | 26 ++++++++------- .../module/modules/world/AutoVillagerCycle.kt | 6 ++-- .../module/modules/world/HighwayTools.kt | 32 +++++++++---------- .../com/lambda/module/modules/world/Nuker.kt | 3 +- 5 files changed, 39 insertions(+), 35 deletions(-) diff --git a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt index de538d66f..5803b9ee9 100644 --- a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt +++ b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt @@ -18,6 +18,7 @@ package com.lambda.module.modules.render import com.lambda.Lambda +import com.lambda.Lambda.mc import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.context.SafeContext @@ -91,7 +92,7 @@ object Freecam : Module( private var position: Vec3d = Vec3d.ZERO private val lerpPos: Vec3d get() { - val tickProgress = Lambda.mc.gameRenderer.camera.lastTickProgress + val tickProgress = mc.gameRenderer.camera.lastTickProgress return prevPosition.interpolate(tickProgress, position) } @@ -110,7 +111,7 @@ object Freecam : Module( } } } - Lambda.mc.gameRenderer.apply { + mc.gameRenderer.apply { camera.setRotation(rotation.yawF, rotation.pitchF) camera.setPos(lerpPos.x, lerpPos.y, lerpPos.z) } @@ -173,7 +174,7 @@ object Freecam : Module( var moveVec = movementVector(moveDir, input.verticalMovement) * speed * sprintModifier if (!input.isInputting) moveVec *= Vec3d(0.0, 1.0, 0.0) // Apply movement - velocity + moveVec + velocity += moveVec velocity *= 0.6 // Update position prevPosition = position diff --git a/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt b/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt index 562d7e969..6738ae8e2 100644 --- a/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AutoPortal.kt @@ -27,15 +27,18 @@ import com.lambda.config.settings.complex.KeybindSetting.Companion.onRelease import com.lambda.context.SafeContext import com.lambda.event.events.TickEvent import com.lambda.event.listener.SafeListener.Companion.listen -import com.lambda.graphics.mc.BoxBuilder import com.lambda.graphics.mc.renderer.ImmediateRenderer.Companion.immediateRenderer import com.lambda.graphics.util.DirectionMask import com.lambda.interaction.BaritoneManager import com.lambda.interaction.construction.verify.TargetState import com.lambda.interaction.managers.hotbar.HotbarRequest import com.lambda.interaction.managers.inventory.InventoryRequest.Companion.inventoryRequest -import com.lambda.interaction.material.StackSelection +import com.lambda.interaction.material.StackSelection.Companion.selectStack import com.lambda.module.Module +import com.lambda.module.modules.world.AutoPortal.PosHandler.currAnchorPos +import com.lambda.module.modules.world.AutoPortal.PosHandler.obiPositions +import com.lambda.module.modules.world.AutoPortal.PosHandler.portalPositions +import com.lambda.module.modules.world.AutoPortal.PosHandler.prevAnchorPos import com.lambda.module.tag.ModuleTag import com.lambda.task.RootTask.run import com.lambda.task.Task @@ -43,7 +46,6 @@ import com.lambda.task.tasks.BuildTask.Companion.build import com.lambda.util.BlockUtils.blockState import com.lambda.util.BlockUtils.isEmpty import com.lambda.util.BlockUtils.isNotEmpty -import com.lambda.util.InputUtils.isSatisfied import com.lambda.util.NamedEnum import com.lambda.util.extension.blockColor import com.lambda.util.extension.tickDelta @@ -74,15 +76,15 @@ object AutoPortal : Module( Render("Render") } - private val previewPlace by setting("Preview Place", Bind.Companion.EMPTY, "The keybind to preview the portal placement and subsequentially place the portal").group(Group.General) + private val previewPlace by setting("Preview Place", Bind.EMPTY, "The keybind to preview the portal placement and subsequentially place the portal").group(Group.General) .onPress { preview = true } .onRelease { preview = false buildTask?.cancel() val posStateMap = - PosHandler.obiPositions.associateWith { + obiPositions.associateWith { TargetState.Block(Blocks.OBSIDIAN) - } + PosHandler.portalPositions.associateWith { + } + portalPositions.associateWith { TargetState.Air } //ToDo: implement non placement interactions like flint and steel in the build sim, in turn, simulating portal lighting too. @@ -92,7 +94,7 @@ object AutoPortal : Module( buildTask = posStateMap .build() .thenOrNull { - if (light) LightTask(PosHandler.currAnchorPos.up(), walkIn) + if (light) LightTask(currAnchorPos.up(), walkIn) else null } .finally { @@ -141,14 +143,14 @@ object AutoPortal : Module( if (!renders || !preview) return@immediateRenderer with (safeContext) { val obiColor = blockColor(Blocks.OBSIDIAN.defaultState, BlockPos.ORIGIN) - PosHandler.obiPositions + obiPositions .map { val box = Box(it).let { box -> if (interpolate) { val offset = lerp( 1.0 - mc.tickDelta, Vec3d.ZERO, - PosHandler.prevAnchorPos.subtract(PosHandler.currAnchorPos).vec3d + prevAnchorPos.subtract(currAnchorPos).vec3d ) box.offset(offset) } else box @@ -158,7 +160,7 @@ object AutoPortal : Module( .forEach { posAndBox -> box(posAndBox.second, outlineConfig) { colors(obiColor.setAlpha(fillAlpha), obiColor) - hideSides(DirectionMask.buildSideMesh(posAndBox.first) { it in PosHandler.obiPositions }.inv()) + hideSides(DirectionMask.buildSideMesh(posAndBox.first) { it in obiPositions }.inv()) } } } @@ -288,7 +290,7 @@ object AutoPortal : Module( } swapPacket() if (walkIn) { - BaritoneManager.setGoalAndPath(GoalBlock(PosHandler.currAnchorPos.up())) + BaritoneManager.setGoalAndPath(GoalBlock(currAnchorPos.up())) } success() } @@ -310,7 +312,7 @@ object AutoPortal : Module( return } - val sel = StackSelection.selectStack(1) { isItem() } + val sel = selectStack(1) { isItem() } val hotbarStack = sel.filterSlots(player.hotbarSlots).firstOrNull() if (hotbarStack != null) { diff --git a/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt b/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt index e150c210a..4d2c9b7d4 100644 --- a/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/AutoVillagerCycle.kt @@ -32,7 +32,7 @@ import com.lambda.interaction.managers.rotating.IRotationRequest.Companion.rotat import com.lambda.interaction.managers.rotating.visibilty.lookAtEntity import com.lambda.module.Module import com.lambda.module.tag.ModuleTag -import com.lambda.sound.SoundManager +import com.lambda.sound.SoundManager.playSound import com.lambda.task.RootTask.run import com.lambda.task.Task import com.lambda.task.tasks.BuildTask.Companion.build @@ -73,7 +73,7 @@ object AutoVillagerCycle : Module( private val interactDelay by setting("Interact Delay", 20, 1..40, 1, "Ticks to wait before interacting with the villager", " ticks").group(Group.General) private val breakDelay by setting("Break Delay", 5, 1..20, 1, "Ticks to wait after breaking the lectern", " ticks").group(Group.General) private val searchRange by setting("Search Range", 5.0, 1.0..10.0, 0.5, "Range to search for nearby villagers", " blocks").group(Group.General) - private val startCyclingBind by setting("Start Cycling", Bind.Companion.EMPTY, "Press to start/stop cycling").group(Group.General) + private val startCyclingBind by setting("Start Cycling", Bind.EMPTY, "Press to start/stop cycling").group(Group.General) .onPress { if (cycleState != CycleState.Idle) { info("Stopped villager cycling.") @@ -164,7 +164,7 @@ object AutoVillagerCycle : Module( findDesiredEnchantment(sellItem)?.let { info("Found desired enchantment: ${it.description().string}!") - SoundManager.playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP) + playSound(SoundEvents.ENTITY_EXPERIENCE_ORB_PICKUP) switchState(CycleState.Idle) return@listen } diff --git a/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt b/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt index 03b7f66d9..fdcb878b6 100644 --- a/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/HighwayTools.kt @@ -20,8 +20,8 @@ package com.lambda.module.modules.world import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.interaction.BaritoneManager -import com.lambda.interaction.construction.blueprint.Blueprint -import com.lambda.interaction.construction.blueprint.PropagatingBlueprint +import com.lambda.interaction.construction.blueprint.Blueprint.Companion.emptyStructure +import com.lambda.interaction.construction.blueprint.PropagatingBlueprint.Companion.propagatingBlueprint import com.lambda.interaction.construction.verify.TargetState import com.lambda.module.Module import com.lambda.module.tag.ModuleTag @@ -36,7 +36,7 @@ import com.lambda.util.extension.moveY import com.lambda.util.math.MathUtils.floorToInt import com.lambda.util.math.rotateClockwise import com.lambda.util.player.MovementUtils.octant -import com.lambda.util.world.StructureUtils +import com.lambda.util.world.StructureUtils.generateDirectionalTube import net.minecraft.block.Block import net.minecraft.block.Blocks import net.minecraft.util.math.BlockPos @@ -113,9 +113,9 @@ object HighwayTools : Module( } private fun buildHighway() { - runningTask = PropagatingBlueprint.propagatingBlueprint { + runningTask = propagatingBlueprint { if (distance !in 0..distanceMoved) { - var structure = Blueprint.emptyStructure() + var structure = emptyStructure() val slice = generateSlice() repeat(sliceSize) { structure = structure.plus(slice.map { it.key.add(currentPos) to it.value }) @@ -127,7 +127,7 @@ object HighwayTools : Module( } else { this@HighwayTools.info("Highway built") disable() - Blueprint.emptyStructure() + emptyStructure() } }.build(collectDrops = buildConfig.collectDrops, lifeMaintenance = true) .run() @@ -139,7 +139,7 @@ object HighwayTools : Module( val center = (width / 2.0).floorToInt() // Hole - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, width, height, @@ -148,7 +148,7 @@ object HighwayTools : Module( ).associateWith { TargetState.Air } if (pavement != Material.None) { - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, width, 1, @@ -157,7 +157,7 @@ object HighwayTools : Module( ).associateWith { target(pavement, pavementMaterial) } // Left rim - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, rimHeight, @@ -166,7 +166,7 @@ object HighwayTools : Module( ).associateWith { target(pavement, pavementMaterial) } // Right rim - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, rimHeight, @@ -176,7 +176,7 @@ object HighwayTools : Module( if (cornerBlock == Corner.None && rimHeight > 0) { // Support for the left rim - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, 1, @@ -185,7 +185,7 @@ object HighwayTools : Module( ).associateWith { TargetState.Support(Direction.UP) } // Support for the right rim - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, 1, @@ -196,7 +196,7 @@ object HighwayTools : Module( } if (ceiling != Material.None) { - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, width, 1, @@ -207,7 +207,7 @@ object HighwayTools : Module( val wallElevation = if (pavement != Material.None) rimHeight else 0 + if (pavement != Material.None) 1 else 0 if (rightWall != Material.None) { - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, height - wallElevation, @@ -217,7 +217,7 @@ object HighwayTools : Module( } if (leftWall != Material.None) { - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, 1, height - wallElevation, @@ -227,7 +227,7 @@ object HighwayTools : Module( } if (floor != Material.None) { - structure += StructureUtils.generateDirectionalTube( + structure += generateDirectionalTube( orthogonal, width, 1, diff --git a/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt b/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt index aff5936f2..4bae86129 100644 --- a/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt +++ b/src/main/kotlin/com/lambda/module/modules/world/Nuker.kt @@ -22,6 +22,7 @@ import com.lambda.config.applyEdits import com.lambda.context.SafeContext import com.lambda.interaction.BaritoneManager import com.lambda.interaction.construction.blueprint.TickingBlueprint +import com.lambda.interaction.construction.blueprint.TickingBlueprint.Companion.tickingBlueprint import com.lambda.interaction.construction.verify.TargetState import com.lambda.module.Module import com.lambda.module.tag.ModuleTag @@ -64,7 +65,7 @@ object Nuker : Module( } onEnable { - task = TickingBlueprint.tickingBlueprint { + task = tickingBlueprint { if (onGround && !player.isOnGround) return@tickingBlueprint emptyMap() val selection = BlockPos.iterateOutwards(player.blockPos, width, height, width)