Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/lambda/mixin/render/CameraMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.module.modules.player
package com.lambda.module.modules.combat

import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
import com.lambda.config.applyEdits
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.module.modules.player
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
Expand Down Expand Up @@ -247,4 +248,4 @@ object Freecam : Module(
val players = world.players.filter { it !is ClientPlayerEntity }
return players.minByOrNull { it.eyePos.squaredDistanceTo(position) }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.module.modules.player
package com.lambda.module.modules.world

import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
import com.lambda.config.applyEdits
Expand All @@ -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
Expand All @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

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
Expand All @@ -28,25 +28,24 @@ import com.lambda.context.SafeContext
import com.lambda.event.events.TickEvent
import com.lambda.event.listener.SafeListener.Companion.listen
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.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.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
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
Expand All @@ -70,7 +69,7 @@ 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"),
Expand Down Expand Up @@ -161,7 +160,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 obiPositions }.inv())
}
}
}
Expand All @@ -186,7 +185,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.module.modules.player
package com.lambda.module.modules.world

import com.ibm.icu.util.Calendar
import com.lambda.event.events.GuiEvent
Expand All @@ -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(
Expand All @@ -48,7 +48,7 @@ object AutoSign : Module(
|<mm> - Minute (00-59)
|<ss> - 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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.lambda.module.modules.player
package com.lambda.module.modules.world

import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
import com.lambda.config.applyEdits
Expand All @@ -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
Expand All @@ -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"),
Expand Down Expand Up @@ -97,7 +94,7 @@ object AutoVillagerCycle : Module(
private var buildTask: Task<*>? = null

init {
setDefaultAutomationConfig() {
setDefaultAutomationConfig {
applyEdits {
hideAllGroupsExcept(rotationConfig, inventoryConfig, breakConfig, interactConfig, buildConfig)
}
Expand Down
Loading