Skip to content

Commit 90ca652

Browse files
committed
Merge branch '1.21.5' into 1.21.11
2 parents 440e171 + 0e533d3 commit 90ca652

38 files changed

+229
-749
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
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-legacy).
1515

1616
<p align="center">
17-
<a href="https://github.com/lambda-client/lambda/releases/download/0.0.1%2B1.21.5/lambda-0.0.1+1.21.5.jar"><img alt="lambda-0.0.1+1.21.5.jar" src="https://raw.githubusercontent.com/lambda-client/assets/refs/heads/main/download_button_0.0.1.png" width="70%" height="70%"></a>
17+
<a href="https://github.com/lambda-client/lambda/releases/download/0.0.2%2B1.21.5/lambda-0.0.2+1.21.5.jar"><img alt="lambda-0.0.1+1.21.5.jar" src="https://raw.githubusercontent.com/lambda-client/assets/refs/heads/main/download_button_0.0.2.png" width="70%" height="70%"></a>
1818
</p>
1919

2020
<p align="center">
@@ -57,7 +57,7 @@ Find our backup matrix space at [\#lambda-client:matrix.org](https://app.element
5757
<a href="https://fabricmc.net/wiki/install"><img src="https://cdn.jonasjones.dev/mod-badges/support-fabric.png" width="150px" alt="Fabric Supported"></a>
5858
1. Install Minecraft 1.21.5 [(download)](https://www.minecraft.net/)
5959
2. Install Fabric [(download)](https://fabricmc.net/use/installer/)
60-
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/0.0.1%2B1.21.5/lambda-0.0.1+1.21.5.jar)
60+
3. Get the latest Lambda version here [(download)](https://github.com/lambda-client/lambda/releases/download/0.0.2%2B1.21.5/lambda-0.0.2+1.21.5.jar)
6161
4. Put the file in your `.minecraft/mods` folder
6262

6363
## Getting Started

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import net.minecraft.client.network.ClientPlayerEntity
3333
import net.minecraft.client.network.OtherClientPlayerEntity
3434
import net.minecraft.entity.LivingEntity
3535
import net.minecraft.entity.decoration.ArmorStandEntity
36+
import net.minecraft.entity.mob.HostileEntity
3637
import net.minecraft.entity.mob.MobEntity
3738
import net.minecraft.entity.passive.PassiveEntity
3839
import java.util.*
@@ -115,9 +116,10 @@ abstract class Targeting(
115116
* @return `true` if the entity is valid for targeting, `false` otherwise.
116117
*/
117118
open fun validate(player: ClientPlayerEntity, entity: LivingEntity) = when {
118-
!players || (entity is OtherClientPlayerEntity && entity.isFriend) -> false
119+
!players && entity is OtherClientPlayerEntity -> false
120+
players && entity is OtherClientPlayerEntity && entity.isFriend -> false
119121
!animals && entity is PassiveEntity -> false
120-
!hostiles && entity is MobEntity -> false
122+
!hostiles && entity is HostileEntity -> false
121123
entity is ArmorStandEntity -> false
122124

123125
!invisible && entity.isInvisibleTo(player) -> false

src/main/kotlin/com/lambda/graphics/animation/Animation.kt

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/main/kotlin/com/lambda/graphics/animation/AnimationTicker.kt

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/main/kotlin/com/lambda/graphics/renderer/esp/ShapeDsl.kt

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ package com.lambda.graphics.renderer.esp
1919

2020
import com.lambda.graphics.pipeline.VertexBuilder
2121
import com.lambda.graphics.renderer.esp.DirectionMask.hasDirection
22-
import com.lambda.graphics.renderer.esp.Treed.Companion.cameraPos
2322
import com.lambda.threading.runSafe
2423
import com.lambda.util.BlockUtils.blockState
2524
import com.lambda.util.extension.max
2625
import com.lambda.util.extension.min
2726
import com.lambda.util.extension.outlineShape
28-
import com.lambda.util.math.minus
2927
import net.minecraft.block.BlockState
3028
import net.minecraft.block.entity.BlockEntity
3129
import net.minecraft.entity.Entity
@@ -48,12 +46,11 @@ class ShapeBuilder(
4846
sides : Int = DirectionMask.ALL,
4947
) = faces.apply {
5048
val boxes = box.pair ?: return@apply
51-
val camera = cameraPos
5249

53-
val pos11 = boxes.first.min - camera
54-
val pos12 = boxes.first.max - camera
55-
val pos21 = boxes.second.min - camera
56-
val pos22 = boxes.second.max - camera
50+
val pos11 = boxes.first.min
51+
val pos12 = boxes.first.max
52+
val pos21 = boxes.second.min
53+
val pos22 = boxes.second.max
5754

5855
val blb by lazy { vertex { vec3(pos11.x, pos11.y, pos11.z).vec3(pos21.x, pos21.y, pos21.z).color(color) } }
5956
val blf by lazy { vertex { vec3(pos11.x, pos11.y, pos12.z).vec3(pos21.x, pos21.y, pos22.z).color(color) } }
@@ -79,9 +76,8 @@ class ShapeBuilder(
7976
topColor : Color = bottomColor,
8077
sides : Int = DirectionMask.ALL
8178
) = faces.apply {
82-
val camera = cameraPos
83-
val pos1 = box.min - camera
84-
val pos2 = box.max - camera
79+
val pos1 = box.min
80+
val pos2 = box.max
8581

8682
val blb by lazy { vertex { vec3(pos1.x, pos1.y, pos1.z).color(bottomColor) } }
8783
val blf by lazy { vertex { vec3(pos1.x, pos1.y, pos2.z).color(bottomColor) } }
@@ -156,12 +152,11 @@ class ShapeBuilder(
156152
mode : DirectionMask.OutlineMode = DirectionMask.OutlineMode.Or,
157153
) = edges.apply {
158154
val boxes = box.pair ?: return@apply
159-
val camera = cameraPos
160155

161-
val pos11 = boxes.first.min - camera
162-
val pos12 = boxes.first.max - camera
163-
val pos21 = boxes.second.min - camera
164-
val pos22 = boxes.second.max - camera
156+
val pos11 = boxes.first.min
157+
val pos12 = boxes.first.max
158+
val pos21 = boxes.second.min
159+
val pos22 = boxes.second.max
165160

166161
val blb by lazy { vertex { vec3(pos11.x, pos11.y, pos11.z).vec3(pos21.x, pos21.y, pos21.z).color(color) } }
167162
val blf by lazy { vertex { vec3(pos11.x, pos11.y, pos12.z).vec3(pos21.x, pos21.y, pos22.z).color(color) } }
@@ -203,9 +198,8 @@ class ShapeBuilder(
203198
sides : Int = DirectionMask.ALL,
204199
mode : DirectionMask.OutlineMode = DirectionMask.OutlineMode.Or,
205200
) = edges.apply {
206-
val camera = cameraPos
207-
val pos1 = box.min - camera
208-
val pos2 = box.max - camera
201+
val pos1 = box.min
202+
val pos2 = box.max
209203

210204
val blb by lazy { vertex { vec3(pos1.x, pos1.y, pos1.z).color(bottomColor) } }
211205
val blf by lazy { vertex { vec3(pos1.x, pos1.y, pos2.z).color(bottomColor) } }

src/main/kotlin/com/lambda/graphics/renderer/esp/Treed.kt

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ import com.lambda.graphics.buffer.vertex.attributes.VertexMode
2323
import com.lambda.graphics.gl.GlStateUtils
2424
import com.lambda.graphics.pipeline.VertexBuilder
2525
import com.lambda.graphics.pipeline.VertexPipeline
26-
import com.lambda.graphics.shader.Shader.Companion.shader
26+
import com.lambda.graphics.shader.Shader
2727
import com.lambda.module.modules.client.StyleEditor
2828
import com.lambda.util.extension.partialTicks
29-
import com.lambda.util.math.minus
30-
import net.minecraft.util.math.Vec3d
3129

3230
/**
3331
* Open class for 3d rendering. It contains two pipelines, one for edges and the other for faces.
3432
*/
35-
open class Treed(static: Boolean) {
33+
open class Treed(private val static: Boolean) {
3634
val shader = if (static) staticMode.first else dynamicMode.first
3735

3836
val faces = VertexPipeline(VertexMode.Triangles, if (static) staticMode.second else dynamicMode.second)
@@ -48,8 +46,9 @@ open class Treed(static: Boolean) {
4846

4947
fun render() {
5048
shader.use()
51-
shader["u_TickDelta"] = mc.partialTicks
52-
shader["u_CameraLerp"] = cachedCameraPos - mc.gameRenderer.camera.pos
49+
50+
if (!static)
51+
shader["u_TickDelta"] = mc.partialTicks
5352

5453
GlStateUtils.withFaceCulling(faces::render)
5554
GlStateUtils.withLineWidth(StyleEditor.outlineWidth, edges::render)
@@ -76,14 +75,7 @@ open class Treed(static: Boolean) {
7675
object Dynamic : Treed(false)
7776

7877
companion object {
79-
private val staticMode = shader("renderer/box_static") to VertexAttrib.Group.STATIC_RENDERER
80-
private val dynamicMode = shader("renderer/box_dynamic") to VertexAttrib.Group.DYNAMIC_RENDERER
81-
82-
var cachedCameraPos: Vec3d = Vec3d.ZERO
83-
val cameraPos: Vec3d
84-
get() {
85-
cachedCameraPos = mc.gameRenderer.camera.pos
86-
return cachedCameraPos
87-
}
78+
private val staticMode = Shader("shaders/vertex/box_static.glsl", "shaders/fragment/pos_color.glsl") to VertexAttrib.Group.STATIC_RENDERER
79+
private val dynamicMode = Shader("shaders/vertex/box_dynamic.glsl", "shaders/fragment/pos_color.glsl") to VertexAttrib.Group.DYNAMIC_RENDERER
8880
}
8981
}

src/main/kotlin/com/lambda/graphics/renderer/gui/FontRenderer.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import com.lambda.graphics.pipeline.VertexBuilder
2222
import com.lambda.graphics.renderer.gui.font.core.GlyphInfo
2323
import com.lambda.graphics.renderer.gui.font.core.LambdaAtlas.get
2424
import com.lambda.graphics.renderer.gui.font.core.LambdaAtlas.height
25-
import com.lambda.graphics.shader.Shader.Companion.shader
2625
import com.lambda.graphics.texture.TextureOwner.bind
2726
import com.lambda.gui.components.ClickGuiLayout
2827
import com.lambda.module.modules.client.LambdaMoji
@@ -39,7 +38,7 @@ import java.awt.Color
3938
* Renders text and emoji glyphs using a shader-based font rendering system.
4039
* This class handles text and emoji rendering, shadow effects, and text scaling.
4140
*/
42-
object FontRenderer : AbstractGUIRenderer(VertexAttrib.Group.FONT, shader("renderer/font")) {
41+
/*object FontRenderer : AbstractGUIRenderer(VertexAttrib.Group.FONT, shader("renderer/font")) {
4342
private val chars get() = StyleEditor.textFont
4443
private val emojis get() = StyleEditor.emojiFont
4544
@@ -278,4 +277,4 @@ object FontRenderer : AbstractGUIRenderer(VertexAttrib.Group.FONT, shader("rende
278277
(color.blue * StyleEditor.shadowBrightness).toInt(),
279278
color.alpha
280279
)
281-
}
280+
}*/

0 commit comments

Comments
 (0)