@@ -3,8 +3,12 @@ package com.lambda.task.tasks
33import baritone.api.pathing.goals.GoalNear
44import com.lambda.Lambda.LOG
55import com.lambda.context.SafeContext
6+ import com.lambda.event.events.RenderEvent
67import com.lambda.event.events.TickEvent
78import com.lambda.event.listener.SafeListener.Companion.listener
9+ import com.lambda.graphics.renderer.esp.DirectionMask
10+ import com.lambda.graphics.renderer.esp.DirectionMask.exclude
11+ import com.lambda.graphics.renderer.esp.DirectionMask.mask
812import com.lambda.interaction.construction.Blueprint
913import com.lambda.interaction.construction.Blueprint.Companion.toStructure
1014import com.lambda.interaction.construction.DynamicBlueprint
@@ -16,6 +20,9 @@ import com.lambda.module.modules.client.TaskFlow
1620import com.lambda.task.Task
1721import com.lambda.util.BaritoneUtils
1822import net.minecraft.util.math.BlockPos
23+ import net.minecraft.util.math.Box
24+ import net.minecraft.util.math.Direction
25+ import java.awt.Color
1926
2027class BuildStructure @Ta5kBuilder constructor(
2128 private val blueprint : Blueprint ,
@@ -43,6 +50,26 @@ class BuildStructure @Ta5kBuilder constructor(
4350 }
4451
4552 val results = blueprint.simulate(player.getCameraPosVec(mc.tickDelta))
53+ val resBlock = results.associateBy { it.blockPos }
54+
55+ TaskFlow .esp.clear()
56+
57+ var sides = DirectionMask .ALL
58+
59+ resBlock.forEach { (pos, res) ->
60+ Direction .entries
61+ .filter { pos.offset(it) in resBlock.keys }
62+ .forEach { sides = sides.exclude(it.mask) }
63+
64+ TaskFlow .esp.build(
65+ Box (pos),
66+ Color (0 , 255 , 0 , 50 ),
67+ Color (0 , 255 , 0 , 50 ),
68+ sides,
69+ DirectionMask .OutlineMode .AND
70+ )
71+ }
72+ TaskFlow .esp.upload()
4673
4774 val instantResults = results.filterIsInstance<BreakResult .Success >()
4875 .filter { it.context.instantBreak }
@@ -77,6 +104,10 @@ class BuildStructure @Ta5kBuilder constructor(
77104 }
78105 }
79106 }
107+
108+ listener<RenderEvent .World > {
109+ TaskFlow .esp.render()
110+ }
80111 }
81112
82113 private fun SafeContext.checkDone () {
0 commit comments