Skip to content

Commit 7f577cd

Browse files
committed
Merge branch '1.21.5' into feature/more-freecam-features
2 parents 84ad6be + 2826f94 commit 7f577cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+375
-289
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- name: Checkout Repository
2626
uses: actions/checkout@v4
2727

28+
- name: Get short commit hash
29+
id: vars
30+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
31+
2832
- name: Set-Up JDK
2933
uses: actions/setup-java@v4
3034
with:
@@ -42,23 +46,24 @@ jobs:
4246

4347
- name: Publish snapshot to maven
4448
if: github.event_name == 'push'
45-
run: ./gradlew publish -PmavenType=snapshots -PcommitHash=SNAPSHOT -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
49+
id: upload
50+
run: ./gradlew publish -PmavenType=snapshots -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
4651

47-
- name: Generate Summary
48-
if: steps.upload.conclusion == 'success' && github.event_name == 'push'
49-
run: |
50-
cat << EOF >> $GITHUB_STEP_SUMMARY
51-
### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
52-
EOF
52+
# - name: Generate Summary
53+
# if: steps.upload.conclusion == 'success' && github.event_name == 'push'
54+
# run: |
55+
# cat << EOF >> $GITHUB_STEP_SUMMARY
56+
# ### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
57+
# EOF
5358

5459
- name: Rename jar
55-
if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
56-
run: mv /build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar /build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
60+
# if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
61+
run: mv build/libs/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}.jar build/libs/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
5762

58-
- name: Failover Upload
59-
if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
63+
- name: Upload
64+
# if: steps.upload.conclusion == 'failure' || github.event_name == 'pull_request'
6065
uses: actions/upload-artifact@v4
6166
with:
6267
name: lambda-nightly
6368
path: |
64-
/build/libs/lambda-fabric-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar
69+
build/libs/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
- name: Build Lambda
4343
run: ./gradlew build
4444

45+
- name: Publish release to maven
46+
id: upload
47+
run: ./gradlew publish -PmavenType=release -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
48+
4549
- name: Create Release
4650
uses: softprops/action-gh-release@v2.0.8
4751
with:

README.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,53 @@
55
![Minecraft](https://img.shields.io/badge/minecraft-1.21.5-green?link=https%3A%2F%2Fwww.minecraft.net%2F)
66
![GitHub Downloads](https://img.shields.io/github/downloads/lambda-client/lambda/total)
77
![Discord](https://img.shields.io/discord/834570721070022687?logo=Discord&logoColor=white&link=https%3A%2F%2Fdiscord.gg%2FMBAEzyFn)
8-
![CodeFactor grade](https://img.shields.io/codefactor/grade/github/lambda-client/lambda?color=royalblue)
9-
![GitHub workflow status](https://img.shields.io/github/actions/workflow/status/lambda-client/lambda/build.yml?branch=1.21.5&logo=gradle)
10-
![GitHub contributors](https://img.shields.io/github/contributors/lambda-client/lambda)
11-
![GitHub Repo stars](https://img.shields.io/github/stars/lambda-client/lambda)
8+
![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/lambda-client/lambda?color=royalblue)
9+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/lambda-client/lambda/build.yml?branch=1.21.5&logo=gradle)
10+
![GitHub Contributors](https://img.shields.io/github/contributors/lambda-client/lambda)
11+
![GitHub Repo Stars](https://img.shields.io/github/stars/lambda-client/lambda)
1212
![GitHub License](https://img.shields.io/github/license/lambda-client/lambda?logo=gplv3&link=https%3A%2F%2Fwww.gnu.org%2Flicenses%2Fgpl-3.0.en.html)
1313

14-
Lambda is a free, open-source Minecraft Fabric utility mod focused on advanced automation to execute complex, repeatable tasks with minimal micromanagement.
14+
Lambda is a free, open-source Minecraft Fabric utility mod focused on advanced automation to execute complex, repeatable tasks with minimal micromanagement. This is a complete, ground-up rewrite of the original client that you can find here: [Lambda Legacy](https://github.com/lambda-client/lambda).
1515

1616
<p align="center">
17-
<a href="https://github.com/lambda-client/lambda/releases/download/1.0.0/lambda-1.0.0.jar"><img alt="lambda-1.0.0.jar" src="https://raw.githubusercontent.com/lambda-client/assets/main/download_button_1.0.0.png" width="70%" height="70%"></a>
17+
<a href="https://github.com/lambda-client/lambda/releases/download/0.0.1/lambda-0.0.1.jar"><img alt="lambda-0.0.1.jar" src="https://raw.githubusercontent.com/lambda-client/assets/main/download_button_0.0.1.png" width="70%" height="70%"></a>
1818
</p>
1919

2020
<p align="center">
21-
<a href="https://discord.gg/MBAEzyFn"><img src="https://invidget.switchblade.xyz/MBAEzyFn" alt="Link to the lambda discord server https://discord.gg/MBAEzyFn"></a>
21+
<a href="https://discord.gg/3y3ah5BtjB"><img src="https://invidget.switchblade.xyz/3y3ah5BtjB" alt="Link to the lambda discord server https://discord.gg/3y3ah5BtjB"></a>
2222
</p>
2323

24-
Find our matrix space at [#lambda-client:matrix.org](https://app.element.io/#/room/#lambda-client:matrix.org).
24+
Find our backup matrix space at [\#lambda-client:matrix.org](https://app.element.io/#/room/#lambda-client:matrix.org).
25+
26+
> [\!WARNING]
27+
> **Alpha Status:** This version of Lambda is a complete rewrite (2+ years in the making) and is currently in an **Alpha** state. While highly capable, please expect bugs and incomplete features as we progress toward Beta. Old addons are not compatible with this version.
28+
29+
-----
30+
31+
## Features
32+
33+
### Automation Engine
34+
* **Build Engine:** Full integration with **Litematica** and schematic files for seamless automated building.
35+
* **Block State Handling:** The build engine natively supports special block states including rotations, attachments (doors, signs, bells), half-slabs, stairs, repeater delay, and even edge cases like flower pots with plants.
36+
* **Conflict-Free Orchestration:** A centralized manager system handles all core interactions (placing, breaking, rotating, inventory) to ensure zero conflicts between concurrently running modules.
37+
38+
### Unmatched Performance
39+
* **High-Speed ESP:** Rendering is optimized to handle extreme scenarios—capable of visualizing all obsidian at the 2b2t spawn without dropping frames.
40+
* **Modern Framework:** Built on modern modding frameworks with efficient rendering pipelines that outperform legacy clients.
41+
42+
### Sophisticated User Experience
43+
* **Fine-Grained Control:** Access over **1000+ settings**, allowing you to tune every aspect of the client to your exact needs.
44+
* **Advanced GUI:** The **Dear ImGui** interface is designed for clarity and depth, featuring quick search, context menus, and easy keybind editing.
45+
* **Automation Profiles:** Use linkable configs to apply complex configurations across multiple modules instantly.
46+
47+
### Stability & Safety
48+
* **Anticheat Ready:** Built with **Grim** and other modern anticheats in mind.
49+
* **Type-Safe Commands:** Uses Minecraft's statically typed command system to ensure input accuracy and reliability.
50+
51+
### Specialized Tools
52+
* **HighwayTools:** Completely rewritten for efficient infrastructure maintenance.
53+
54+
-----
2555

2656
## Installation
2757
<a href="https://fabricmc.net/wiki/install"><img src="https://cdn.jonasjones.dev/mod-badges/support-fabric.png" width="150px" alt="Fabric Supported"></a>
@@ -30,19 +60,19 @@ Find our matrix space at [#lambda-client:matrix.org](https://app.element.io/#/ro
3060
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/1.0.0/lambda-1.0.0.jar)
3161
4. Put the file in your `.minecraft/mods` folder
3262

33-
## FAQ
63+
## Getting Started
3464

3565
How do I...
3666

3767
<details>
38-
<summary>... open the ClickGUI?</summary>
68+
<summary><strong>... open the ClickGUI?</strong></summary>
3969

4070
> Press `Y`.
4171
4272
</details>
4373

4474
<details>
45-
<summary>... execute a command?</summary>
75+
<summary><strong>... I execute a command?</strong></summary>
4676

4777
> Use the ingame chat with the prefix `;`.
4878
@@ -56,11 +86,13 @@ How do I...
5686

5787
[![GitHub contributors](https://contrib.rocks/image?repo=lambda-client/lambda)](https://github.com/lambda-client/lambda/graphs/contributors)
5888

89+
We need the help of the community to support the growth of this project. Whether that be developers contributing to the codebase, creating addons, or users giving feedback.
90+
5991
---
6092

6193
If you have any questions, concerns, or suggestions,
6294
you can visit our [official Discord server](https://discord.gg/MBAEzyFn).
6395

6496
> ### Disclaimer
6597
> Lambda is not affiliated with Mojang Studios. Minecraft is a registered trademark of Mojang Studios.
66-
Use of the Lambda software is subject to the terms outlined in the license agreement [GNU General Public License v3.0](https://github.com/lambda-client/lambda/blob/master/LICENSE.md).
98+
Use of the Lambda software is subject to the terms outlined in the license agreement [GNU General Public License v3.0](https://github.com/lambda-client/lambda/blob/master/LICENSE.md).

build.gradle.kts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ dependencies {
180180
modCompileOnly("maven.modrinth:malilib:$maLiLibVersion")
181181
modCompileOnly("maven.modrinth:litematica:$litematicaVersion")
182182

183+
// DevLogin
184+
modRuntimeOnly("com.ptsmods:devlogin:3.5")
185+
183186
// Test implementations
184187
testImplementation(kotlin("test"))
185188
testImplementation("org.mockito.kotlin:mockito-kotlin:$mockitoKotlin")
@@ -234,23 +237,17 @@ java {
234237

235238
publishing {
236239
val publishType = project.findProperty("mavenType").toString()
237-
val commitHash = project.findProperty("commitHash").toString()
238-
val mavenUrl = if (project.findProperty("mavenType") == "releases") "https://maven.lambda-client.org/releases" else "https://maven.lambda-client.org/snapshots"
239-
240240
val isSnapshots = publishType == "snapshots"
241-
val isValidCommit = commitHash.matches(Regex("[A-Fa-f0-9]+")) || commitHash == "SNAPSHOT"
242-
243-
if (!isSnapshots && isValidCommit)
244-
println("WARNING: Commit hash for snapshot releases was supplied but the publish type is 'releases'. The commit will be omitted.")
245-
else if (isSnapshots && !isValidCommit)
246-
error("The maven publish type is set to 'snapshots' but no valid commit hash was supplied.")
241+
val mavenUrl = if (isSnapshots) "https://maven.lambda-client.org/snapshots" else "https://maven.lambda-client.org/releases"
242+
val mavenVersion =
243+
if (isSnapshots) "$modVersion+$minecraftVersion-SNAPSHOT"
244+
else "$modVersion+$minecraftVersion"
247245

248-
publications {
246+
publications {
249247
create<MavenPublication>("maven") {
250248
groupId = mavenGroup
251249
artifactId = modId
252-
version = if (isSnapshots) "$modVersion+$minecraftVersion-$commitHash"
253-
else "$modVersion+$minecraftVersion"
250+
version = mavenVersion
254251

255252
from(components["java"])
256253
}

src/main/kotlin/com/lambda/command/commands/TransferCommand.kt

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ import com.lambda.command.LambdaCommand
3030
import com.lambda.config.AutomationConfig
3131
import com.lambda.interaction.material.StackSelection.Companion.selectStack
3232
import com.lambda.interaction.material.container.ContainerManager
33-
import com.lambda.interaction.material.container.ContainerManager.containerWithMaterial
34-
import com.lambda.interaction.material.container.ContainerManager.containerWithSpace
33+
import com.lambda.interaction.material.container.ContainerManager.findContainersWithMaterial
34+
import com.lambda.interaction.material.container.ContainerManager.findContainersWithSpace
3535
import com.lambda.interaction.material.transfer.TransferResult
3636
import com.lambda.task.RootTask.run
37+
import com.lambda.threading.runSafe
3738
import com.lambda.util.Communication.info
3839
import com.lambda.util.extension.CommandBuilder
3940

@@ -54,8 +55,10 @@ object TransferCommand : LambdaCommand(
5455
isItem(stack(ctx).value().item)
5556
}
5657
with(AutomationConfig.Companion.DEFAULT) {
57-
selection.containerWithMaterial().forEachIndexed { i, container ->
58-
builder.suggest("\"${i + 1}. ${container.name}\"", container.description(selection))
58+
runSafe {
59+
selection.findContainersWithMaterial().forEachIndexed { i, container ->
60+
builder.suggest("\"${i + 1}. ${container.name}\"", container.description(selection))
61+
}
5962
}
6063
}
6164
builder.buildFuture()
@@ -66,8 +69,10 @@ object TransferCommand : LambdaCommand(
6669
isItem(stack(ctx).value().item)
6770
}
6871
with(AutomationConfig.Companion.DEFAULT) {
69-
containerWithSpace(selection).forEachIndexed { i, container ->
70-
builder.suggest("\"${i + 1}. ${container.name}\"", container.description(selection))
72+
runSafe {
73+
findContainersWithSpace(selection).forEachIndexed { i, container ->
74+
builder.suggest("\"${i + 1}. ${container.name}\"", container.description(selection))
75+
}
7176
}
7277
}
7378
builder.buildFuture()
@@ -76,11 +81,11 @@ object TransferCommand : LambdaCommand(
7681
val selection = selectStack(amount().value()) {
7782
isItem(stack().value().item)
7883
}
79-
val fromContainer = ContainerManager.container().find {
84+
val fromContainer = ContainerManager.containers().find {
8085
it.name == from().value().split(".").last().trim()
8186
} ?: return@executeWithResult failure("From container not found")
8287

83-
val toContainer = ContainerManager.container().find {
88+
val toContainer = ContainerManager.containers().find {
8489
it.name == to().value().split(".").last().trim()
8590
} ?: return@executeWithResult failure("To container not found")
8691

src/main/kotlin/com/lambda/config/groups/BreakSettings.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import com.lambda.interaction.managers.breaking.BreakConfig.AnimationMode
2626
import com.lambda.interaction.managers.breaking.BreakConfig.BreakConfirmationMode
2727
import com.lambda.interaction.managers.breaking.BreakConfig.BreakMode
2828
import com.lambda.interaction.managers.breaking.BreakConfig.SwingMode
29-
import com.lambda.util.BlockUtils.allSigns
3029
import com.lambda.util.NamedEnum
30+
import net.minecraft.block.Block
3131
import java.awt.Color
3232

3333
open class BreakSettings(
@@ -46,7 +46,7 @@ open class BreakSettings(
4646

4747
// Double break
4848
override val doubleBreak by c.setting("Double Break", true, "Allows breaking two blocks at once").group(baseGroup, Group.General).index()
49-
override val unsafeCancels by c.setting("Unsafe Cancels", true, "Allows cancelling block breaking even if the server might continue breaking sever side, potentially causing unexpected state changes").group(baseGroup, Group.General).index()
49+
override val unsafeCancels by c.setting("Unsafe Cancels", true, "Allows cancelling block breaking even if the server might continue breaking sever side, potentially causing unexpected state changes") { doubleBreak }.group(baseGroup, Group.General).index()
5050

5151
// Fixes / Delays
5252
override val breakThreshold by c.setting("Break Threshold", 0.70f, 0.1f..1.0f, 0.01f, "The break amount at which the block is considered broken").group(baseGroup, Group.General).index()
@@ -60,7 +60,7 @@ open class BreakSettings(
6060
override val tickStageMask by c.setting("Break Stage Mask", setOf(TickEvent.Input.Post), ALL_STAGES.toSet(), description = "The sub-tick timing at which break actions can be performed").group(baseGroup, Group.General).index()
6161

6262
// Swap
63-
override val swapMode by c.setting("Swap Mode", BreakConfig.SwapMode.End, "Decides when to swap to the best suited tool when breaking a block").group(baseGroup, Group.General).index()
63+
override val swapMode by c.setting("Break Swap Mode", BreakConfig.SwapMode.End, "Decides when to swap to the best suited tool when breaking a block").group(baseGroup, Group.General).index()
6464

6565
// Swing
6666
override val swing by c.setting("Swing Mode", SwingMode.Constant, "The times at which to swing the players hand").group(baseGroup, Group.General).index()
@@ -72,12 +72,11 @@ open class BreakSettings(
7272
// Pending / Post
7373
override val breakConfirmation by c.setting("Break Confirmation", BreakConfirmationMode.BreakThenAwait, "The style of confirmation used when breaking").group(baseGroup, Group.General).index()
7474
override val breaksPerTick by c.setting("Breaks Per Tick", 5, 1..30, 1, "Maximum instant block breaks per tick").group(baseGroup, Group.General).index()
75-
override val maxPendingBreaks by c.setting("Max Pending Breaks", 15, 1..30, 1, "The maximum amount of pending breaks").group(baseGroup, Group.General).index()
7675

7776
// Block
77+
override val ignoredBlocks by c.setting("Ignored Blocks", emptySet<Block>(), description = "Blocks that wont be broken").group(baseGroup, Group.General).index()
7878
override val avoidLiquids by c.setting("Avoid Liquids", true, "Avoids breaking blocks that would cause liquid to spill").group(baseGroup, Group.General).index()
7979
override val avoidSupporting by c.setting("Avoid Supporting", true, "Avoids breaking the block supporting the player").group(baseGroup, Group.General).index()
80-
override val ignoredBlocks by c.setting("Ignored Blocks", allSigns, description = "Blocks that wont be broken").group(baseGroup, Group.General).index()
8180

8281
// Tool
8382
override val efficientOnly by c.setting("Efficient Tools Only", true, "Only use tools suitable for the given block (will get the item drop)") { swapMode.isEnabled() }.group(baseGroup, Group.General).index()

src/main/kotlin/com/lambda/config/groups/BuildConfig.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ interface BuildConfig : ISettingGroup {
2828
val stayInRange: Boolean
2929
val collectDrops: Boolean
3030
val spleefEntities: Boolean
31-
val actionsPerTick: Int
3231
val maxPendingActions: Int
3332
val actionTimeout: Int
3433
val maxBuildDependencies: Int
3534

36-
val useDefaultReach: Boolean
3735
val attackReach: Double
3836
val interactReach: Double
3937
val scanReach: Double

0 commit comments

Comments
 (0)