Two bugs in CollisionDetector caused persistent Y-axis bouncing (0.6 block
oscillation) while walking on flat ground:
1. GetAxisStepOrder used a complex 6-branch sorting that often placed
horizontal axes before Y. Vanilla's Direction.Axis.axisStepOrder always
resolves Y first, then the larger horizontal axis. Replaced with the
simple two-case vanilla logic.
2. The horizontal-blocked checks (blockedX/blockedZ) used exact != which
triggered on floating-point noise (~1e-15) from sin/cos in movement
input. Vanilla uses Mth.equal (1e-5 threshold). This false positive
caused step-up to fire every few ticks on flat terrain.
Also includes DescendTemplate robustness fixes from the previous session
(fail on unintended climbing, suppress forward input on climbable blocks).
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