Skip to content

Commit aa57f9b

Browse files
committed
Remove "smart" pathing for now
1 parent bbdbd4d commit aa57f9b

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

common/src/main/kotlin/com/lambda/task/tasks/BuildTask.kt

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,26 +98,12 @@ class BuildTask @Ta5kBuilder constructor(
9898
if (collectDrops()) return@listen
9999

100100
val results = blueprint.simulate(player.eyePos, interact, rotation, inventory, build)
101-
val resultPostions = results.map { it.blockPos }
102101

103-
val sim = blueprint.simulation(interact, rotation, inventory, build)
104-
BlockPos.iterateOutwards(player.blockPos, 2, 2, 2).forEach {
105-
sim.simulate(it.toFastVec())
106-
}
107-
val bestPos = sim.goodPositions()
108-
.filter { it.pos !in resultPostions }
109-
.maxByOrNull { it.interactions }
110-
111-
val drawables = results
102+
TaskFlowModule.drawables = results
112103
.filterIsInstance<Drawable>()
113104
.plus(pendingInteractions.toList())
114105
.toMutableList()
115106

116-
if (bestPos != null && build.pathing) {
117-
drawables.add(bestPos)
118-
}
119-
TaskFlowModule.drawables = drawables
120-
121107
val resultsNotBlocked = results
122108
.filter { result -> pendingInteractions.none { it.expectedPos == result.blockPos } }
123109
.sorted()
@@ -142,6 +128,7 @@ class BuildTask @Ta5kBuilder constructor(
142128
is BuildResult.NotVisible,
143129
is PlaceResult.NoIntegrity -> {
144130
if (!build.pathing) return@listen
131+
val sim = blueprint.simulation(interact, rotation, inventory, build)
145132
val goal = BuildGoal(sim, player.blockPos)
146133
BaritoneUtils.setGoalAndPath(goal)
147134
}
@@ -151,10 +138,6 @@ class BuildTask @Ta5kBuilder constructor(
151138
}
152139

153140
is BuildResult.Contextual -> {
154-
bestPos?.let {
155-
if (build.pathing) BaritoneUtils.setGoalAndPath(GoalNear(it.pos, 1))
156-
}
157-
158141
if (atMaxPendingInteractions) return@listen
159142
when (bestResult) {
160143
is BreakResult.Break -> {

0 commit comments

Comments
 (0)