@@ -43,20 +43,21 @@ object BlockESP : Module(
4343 description = " Render block ESP" ,
4444 tag = ModuleTag .RENDER ,
4545) {
46- private var drawFaces: Boolean by setting(" Draw Faces" , true , " Draw faces of blocks" ).onValueSet(::rebuildMesh).onValueSet { _, to -> if (! to) drawOutlines = true }
47- private var drawOutlines: Boolean by setting(" Draw Outlines" , true , " Draw outlines of blocks" ).onValueSet(::rebuildMesh).onValueSet { _, to -> if (! to) drawFaces = true }
48- private val mesh by setting(" Mesh" , true , " Connect similar adjacent blocks" ).onValueSet(::rebuildMesh)
46+ // ToDo: Toggle searching, solve memory leak
47+ private val searchBlocks by setting(" Search Blocks" , true , " Search for blocks around the player" )
48+ private val blocks by setting(" Blocks" , setOf (Blocks .BEDROCK ), setOf (Blocks .BEDROCK ), " Render blocks" ) { searchBlocks }.onValueSet(::rebuildMesh)
49+ private var drawFaces: Boolean by setting(" Draw Faces" , true , " Draw faces of blocks" ) { searchBlocks }.onValueSet(::rebuildMesh).onValueSet { _, to -> if (! to) drawOutlines = true }
50+ private var drawOutlines: Boolean by setting(" Draw Outlines" , true , " Draw outlines of blocks" ) { searchBlocks }.onValueSet(::rebuildMesh).onValueSet { _, to -> if (! to) drawFaces = true }
51+ private val mesh by setting(" Mesh" , true , " Connect similar adjacent blocks" ) { searchBlocks }.onValueSet(::rebuildMesh)
4952
50- private val useBlockColor by setting(" Use Block Color" , false , " Use the color of the block instead" ).onValueSet(::rebuildMesh)
51- private val faceColor by setting(" Face Color" , Color (100 , 150 , 255 , 51 ), " Color of the surfaces" ) { drawFaces && ! useBlockColor }.onValueSet(::rebuildMesh)
52- private val outlineColor by setting(" Outline Color" , Color (100 , 150 , 255 , 128 ), " Color of the outlines" ) { drawOutlines && ! useBlockColor }.onValueSet(::rebuildMesh)
53+ private val useBlockColor by setting(" Use Block Color" , false , " Use the color of the block instead" ) { searchBlocks } .onValueSet(::rebuildMesh)
54+ private val faceColor by setting(" Face Color" , Color (100 , 150 , 255 , 51 ), " Color of the surfaces" ) { searchBlocks && drawFaces && ! useBlockColor }.onValueSet(::rebuildMesh)
55+ private val outlineColor by setting(" Outline Color" , Color (100 , 150 , 255 , 128 ), " Color of the outlines" ) { searchBlocks && drawOutlines && ! useBlockColor }.onValueSet(::rebuildMesh)
5356
54- private val outlineMode by setting(" Outline Mode" , DirectionMask .OutlineMode .AND , " Outline mode" ).onValueSet(::rebuildMesh)
55-
56- private val blocks by setting(" Blocks" , setOf (Blocks .BEDROCK ), setOf (Blocks .BEDROCK ), " Render blocks" ).onValueSet(::rebuildMesh)
57+ private val outlineMode by setting(" Outline Mode" , DirectionMask .OutlineMode .AND , " Outline mode" ) { searchBlocks }.onValueSet(::rebuildMesh)
5758
5859 @JvmStatic
59- val barrier by setting(" Solid Barrier Block" , true , " Render barrier blocks" )
60+ val barrier by setting(" Solid Barrier Block" , true , " Render barrier blocks" ).onValueChange { _, _ -> mc.worldRenderer.reload() }
6061
6162 // ToDo: I wanted to render this as a transparent / translucent block with a red tint.
6263 // Like the red stained glass block without the texture sprite.
0 commit comments