Skip to content

Commit f93ea7c

Browse files
committed
merge from 1.21.5
2 parents 675da83 + 6291b9e commit f93ea7c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/main/kotlin/com/lambda/module/modules/movement/Speed.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ object Speed : Module(
175175
ncpSpeed = NCP_BASE_SPEED
176176
}
177177

178-
ncpSpeed = ncpSpeed.coerceIn(1.0..NCP_BASE_SPEED)
178+
ncpSpeed = ncpSpeed.coerceIn(NCP_BASE_SPEED..1.0)
179179

180180
val moveSpeed = if (isInputting) ncpSpeed else {
181181
ncpSpeed = NCP_BASE_SPEED

src/main/kotlin/com/lambda/module/modules/render/BlockESP.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ object BlockESP : Module(
4141
description = "Render block ESP",
4242
tag = ModuleTag.RENDER,
4343
) {
44-
// ToDo: Toggle searching, solve memory leak
4544
private val searchBlocks by setting("Search Blocks", true, "Search for blocks around the player")
46-
private val blocks by setting("Blocks", setOf(Blocks.BEDROCK), description = "Render blocks") { searchBlocks }.onValueChange(::rebuildMesh)
45+
private val blocks by setting("Blocks", setOf(Blocks.BEDROCK), description = "Render blocks") { searchBlocks }
46+
.onSelect { rebuildMesh(this, null, null) }
47+
.onDeselect { rebuildMesh(this, null, null) }
48+
4749
private var drawFaces: Boolean by setting("Draw Faces", true, "Draw faces of blocks") { searchBlocks }.onValueChange(::rebuildMesh).onValueChange { _, to -> if (!to) drawOutlines = true }
4850
private var drawOutlines: Boolean by setting("Draw Outlines", true, "Draw outlines of blocks") { searchBlocks }.onValueChange(::rebuildMesh).onValueChange { _, to -> if (!to) drawFaces = true }
4951
private val mesh by setting("Mesh", true, "Connect similar adjacent blocks") { searchBlocks }.onValueChange(::rebuildMesh)
@@ -88,5 +90,5 @@ object BlockESP : Module(
8890
if (drawOutlines) outline(pos, state, if (useBlockColor) blockColor else outlineColor, sides, outlineMode)
8991
}
9092

91-
private fun rebuildMesh(ctx: SafeContext, from: Any, to: Any): Unit = esp.rebuild()
93+
private fun rebuildMesh(ctx: SafeContext, from: Any?, to: Any?): Unit = esp.rebuild()
9294
}

0 commit comments

Comments
 (0)