Fix a cluster of execution-layer issues that caused replans and void
falls when traversing narrow ledges and multi-block descents between
(251.5,141,210.5) and (252.5,138,220.5):
- WalkTemplate / GroundedSegmentController: suppress the pre-rotation
bias toward the next segment's exit heading on stable-footing Turn
exits where the next segment is not a jump. The next template
snaps yaw on its first tick anyway, and pre-rotating mid-stride on
a 1-block walkway pushes sprint drift perpendicular to the path and
walks the bot off the edge. Turn exits into a jump still get the
bias so the takeoff direction stays aligned.
- GroundedSegmentController.ShouldComplete: relax the headingReady
gate for Turn exits with stable footing so the segment can complete
once yaw is aligned with either the current or the next segment
heading (within 25/15 deg). Without this the removed bias would
leave the bot stuck at the end of a walkway waiting for a rotation
that never happens.
- DescendTemplate: restrict the airborne exit-heading bias so it only
kicks in when the footprint is inside the landing block, or on
single-step drops where the fall is too short for lateral drift to
miss the landing column. On 2+ block drops the bot now keeps yaw
pointed at the landing center for the whole fall.
- DescendTemplate: add a multi-block overshoot guard on PrepareJump
exits. Once airborne and past the landing end-plane on a 2+ Y
drop, release forward/sprint and press back briefly so air drag
pulls the bot back into the 1x1 landing column instead of sailing
one block past it into the neighbouring void.
Live round-trip between the two goal coordinates now completes with
zero replans in three consecutive runs in each direction. Full unit
test suite is unchanged from the pre-existing baseline (22 failing
tests, all orthogonal to this change).
Made-with: Cursor
Replace seven hand-written IMove classes (MoveTraverse, MoveDiagonal,
MoveAscend, MoveDiagonalAscend, MoveDiagonalDescend, MoveParkour,
MoveSidewallParkour) with a single MoveJump driven by a JumpDescriptor
(XOffset, ZOffset, YDelta, JumpFlavor). JumpFeasibility is the single
source of truth for the physics/cost rules of every jump-family move.
A* no longer iterates a flat IMove[]. The Calculate loop now drives
an IMoveExpander[] that writes into a stackalloc Span<MoveNeighbor>,
eliminating per-iteration heap traffic. JumpExpander enumerates every
jump-family descriptor dynamically; LegacyMoveExpander wraps the
remaining dynamic-landing moves (MoveDescend, MoveSprintDescend,
MoveClimb, MoveFall) so callers that still pass a custom IMove[]
keep working.
Add two O(1) short-circuits at the top of JumpExpander.Expand:
- Hoist the per-node parkour preconditions (AllowParkour + CanSprint,
standing block climbability, feet-liquid, head clearance at y+2)
so ~170 SprintJump + Sidewall descriptors never call JumpFeasibility
when the node cannot take off at all.
- Precompute an 8-way "first step has no floor" table indexed by
(sign(dx), sign(dz)) so SprintJump descriptors in a direction that
has a walkable floor underneath are dropped without Evaluate.
- Add a conservative "any cardinal wall at y or y+1" probe that skips
all 112 Sidewall descriptors when no wall exists adjacent to the
takeoff.
Move tests switch to the new MoveJump.* factory methods. Behavior is
verified by the existing test suite: the 21 pre-existing baseline
failures are preserved exactly, 0 regressions introduced.
Made-with: Cursor
Introduce an EntryPreparationState carried on PathNode + A* context so
sidewall parkour can explicitly request one or more runway traverses
before takeoff instead of silently dropping the move. ParkourFeasibility
gains TryGetRequiredStaticEntryRunupSteps + HasPreparedRunup helpers so
long descends (major=5, dy=-1) only remain feasible when the preceding
node proved the runup.
Widen HasDominantAxisRunUp to accept cold-start sprint-jumps within
~3.1-3.5 blocks horizontally so lone overhang / staircase takeoffs stay
feasible without a 2-block runway (matches Baritone's MomentumBehavior
.ALLOWED contract).
Add a runtime SidewallParkourController that implements the corner
commitment + wall-hug chain during execution.
Extend pathing test fixtures with InitialMomentumTicks, add sidewall
accepted/rejected scenarios, and refresh timing + contract baselines to
reflect the new planner shapes. Document the design in
docs/superpowers/specs and plans.
Made-with: Cursor
- MoveDiagonal: allow single-side-blocked diagonals (corner walk) so
the bot can hug an open side to cut around a wall; both-sides-blocked
remains impossible. Walk-speed cost when one side is blocked.
- MoveSprintDescend: sprint off a ledge covering 2 horizontal blocks
while dropping 1-3 blocks. Registered for cardinal and diagonal
offsets.
- MoveParkour: support negative yDelta (-1, -2) for descending parkour
where the bot sprint-jumps across a gap and lands on a lower
platform. Registered cardinal (dist 2-4, y-1/-2) and diagonal
variants.
- DescendTemplate: sprint when horizontal distance > 1.5 blocks.
- SprintJumpTemplate: increase vertical landing tolerance for descend.
Made-with: Cursor
- Add MoveDiagonalAscend and MoveDiagonalDescend for "corner" moves:
step diagonally around a wall edge while ascending/descending 1 block.
Requires at least one intermediate cardinal direction to be passable.
- Fix pitch calculation: look toward target's eye level (same height
delta as feet delta) instead of subtracting eye height, which caused
the player to stare at the ground during flat walks.
- Add Yaw/Pitch smoothing via SmoothYaw/SmoothPitch in TemplateHelper.
Max 35 deg/tick for yaw, 25 deg/tick for pitch. Prevents instant
camera snaps between path segments while still being responsive
enough for sprint-jumps and tight maneuvers.
- Apply smoothing to all five action templates (Walk, Ascend, Descend,
Climb, SprintJump).
Made-with: Cursor
MoveParkour rewritten to support both cardinal and diagonal sprint jumps
with unified (xOff, zOff) interface. New capabilities:
- 4-block cardinal sprint jumps with edge-approach timing in template
- Diagonal parkour: (2,1), (1,2), (2,2), (3,1), (1,3) in all quadrants
- Ascending parkour extended to dist=3 (cardinal)
- Overshoot safety check after landing destination
- Block parkour from climbable starting blocks (vine/ladder)
MoveDescend/MoveFall enhanced with Baritone-style dynamic fall scanning:
- Water landing: accepts falls of any height into water
- Mid-fall ladder/vine grab: resets effective fall height (<=11 blocks)
- CalculationContext gains MaxFallHeightWater, AllowLadderGrabDuringFall
SprintJumpTemplate gains distance-based approach timing:
- Long jumps (>=3.5 blocks): delays jump until 0.5 blocks from center
- Medium jumps (>=2.5): 0.35 blocks approach
- Landing tolerance scales with jump distance
All movements verified on 1.21.11 local server.
Made-with: Cursor
Phase 2.2: MoveParkour for sprint-jump across 1-2 block gaps (distance 2-3)
and ascending parkour (distance 2, +1Y). Registered in BuildDefaultMoves
with CalculationContext.AllowParkour gating.
Phase 3.1-3.2: Template execution engine replacing the waypoint queue system.
- IActionTemplate interface with per-tick state machine pattern
- Templates: Walk, Ascend, Descend, Climb, Fall, SprintJump
- ActionTemplateFactory maps MoveType to the correct template
- PathExecutor drives sequential template execution with logging
- PathSegmentManager handles replanning on failure (up to 5 retries)
- McClient integration: MoveToAStar now creates PathSegmentManager,
UpdatePathfindingInput delegates to it, CancelMovement/ClientIsMoving
updated for both old and new systems.
Tested on 1.21.11: straight walk, zigzag maze, stair ascent,
1-gap and 2-gap sprint jumps all pass.
Made-with: Cursor
The X and Z fields shared bit 36, causing nodes like (1,80,0)
and (0,80,0) to hash to the same value. Fixed by using proper
non-overlapping bit allocation: X in bits 38-63, Z in bits 12-37,
Y in bits 0-11. Added diagnostic logging to pathfind command.
Made-with: Cursor
Implements the new Baritone-inspired A* pathfinding system:
- Core types: PathNode, PathResult, MoveResult, MoveType, ActionCosts
- BinaryHeapOpenSet min-heap for A* open set
- AStarPathFinder with timeout, cancellation, partial path support
- CalculationContext for thread-safe world state snapshots
- MoveHelper for block passability checks
- IGoal interface + GoalBlock, GoalXZ, GoalNear, GoalComposite
- IMove interface + MoveTraverse, MoveDiagonal, MoveAscend, MoveDescend, MoveClimb
- /pathfind command for testing the new pathfinder
Made-with: Cursor