Skip to content

Commit e8d98f3

Browse files
committed
Semi fixes
1 parent d71c7af commit e8d98f3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/kotlin/HighwayTools.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ internal object HighwayTools : PluginModule(
168168
private val printDebug by setting("Show Queue", false, { page == Page.CONFIG }, description = "Shows task queue in HUD")
169169
private val debugMessages by setting("Debug Messages", DebugMessages.IMPORTANT, { page == Page.CONFIG }, description = "Sets the debug log depth level")
170170
private val goalRender by setting("Goal Render", false, { page == Page.CONFIG }, description = "Renders the baritone goal")
171+
private val showCurrentPos by setting("Current Pos Render", false, { page == Page.CONFIG }, description = "Renders the current position")
171172
private val filled by setting("Filled", true, { page == Page.CONFIG }, description = "Renders colored task surfaces")
172173
private val outline by setting("Outline", true, { page == Page.CONFIG }, description = "Renders colored task outlines")
173174
private val popUp by setting("Pop up", true, { page == Page.CONFIG }, description = "Funny render effect")
@@ -463,7 +464,7 @@ internal object HighwayTools : PluginModule(
463464
renderer.thickness = thickness
464465
val currentTime = System.currentTimeMillis()
465466

466-
renderer.add(currentBlockPos, ColorHolder(255, 255, 255))
467+
if (showCurrentPos) renderer.add(currentBlockPos, ColorHolder(255, 255, 255))
467468

468469
if (containerTask.taskState != TaskState.DONE) {
469470
addToRenderer(containerTask, currentTime)
@@ -934,7 +935,9 @@ internal object HighwayTools : PluginModule(
934935
private fun SafeClientEvent.doPathing() {
935936
when (moveState) {
936937
MovementState.RUNNING, MovementState.BRIDGE -> {
937-
if (!shouldBridge() && moveState == MovementState.BRIDGE) moveState = MovementState.RUNNING
938+
if (!shouldBridge() && moveState == MovementState.BRIDGE) {
939+
moveState = MovementState.RUNNING
940+
}
938941

939942
if (moveState == MovementState.BRIDGE &&
940943
bridging && player.positionVector.distanceTo(currentBlockPos) < 1) {
@@ -950,6 +953,8 @@ internal object HighwayTools : PluginModule(
950953
player.motionZ = (target.z - player.posZ).coerceIn(-0.2, 0.2)
951954
}
952955

956+
goal = GoalNear(currentBlockPos, 0)
957+
953958
var nextPos = currentBlockPos
954959
val possiblePos = nextPos.add(startingDirection.directionVec)
955960

@@ -971,8 +976,6 @@ internal object HighwayTools : PluginModule(
971976
refreshData()
972977
}
973978

974-
goal = GoalNear(currentBlockPos, 0)
975-
976979
if (currentBlockPos.distanceTo(targetBlockPos) < 2 ||
977980
(distancePending > 0 && startingBlockPos.add(startingDirection.directionVec.multiply(distancePending)).distanceTo(currentBlockPos) == 0.0)) {
978981
sendChatMessage("$chatName Reached target destination")

0 commit comments

Comments
 (0)