nav-turn
The only navigation tool that changes orientation. All movement tools (nav-move, nav-climb, nav-descend) move forward relative to current facing.
Turn Behavior
| Direction |
Action |
right |
+90° from current yaw → round to cardinal |
left |
-90° from current yaw → round to cardinal |
back |
+180° from current yaw → round to cardinal |
forward |
Round current yaw to cardinal (align only) |
Output yaw is always one of: 0°, 90°, 180°, 270°.
Output
Success (status: "success"):
value: Description string
extra.yaw: Cardinal yaw (0, 90, 180, or 270)
extra.direction: Direction used
Failure (status: "failed"):
reason: One of "invalid_direction", "status_failed", "snapto_failed"
Invariants
- Always results in cardinal yaw (0, 90, 180, 270)
- Always snaps to block center:
(floor(x)+0.5, y, floor(z)+0.5)
- Always sets pitch to 0°
- Never changes block position (orientation + centering only)
Planning Notes
- Use
nav-turn before movement to change direction
- Use
forward to align to nearest cardinal without rotation
- Compose with
nav-move, nav-climb, nav-descend for navigation sequences
Example Workflow
{"type":"nav-turn","direction":"right","out":"$turn"}
{"type":"nav-move","out":"$m1"}
{"type":"nav-move","out":"$m2"}
{"type":"nav-turn","direction":"left","out":"$turn2"}
1---2name: nav-turn3description: Turn to a cardinal direction (0, 90, 180, 270) and snap to block center. Atomic orientation operation suitable for composition.4---56# nav-turn78The only navigation tool that changes orientation. All movement tools (`nav-move`, `nav-climb`, `nav-descend`) move forward relative to current facing.910## Turn Behavior1112| Direction | Action |13|-----------|--------|14| `right` | +90° from current yaw → round to cardinal |15| `left` | -90° from current yaw → round to cardinal |16| `back` | +180° from current yaw → round to cardinal |17| `forward` | Round current yaw to cardinal (align only) |1819Output yaw is always one of: 0°, 90°, 180°, 270°.2021## Output2223Success (`status: "success"`):24- `value`: Description string25- `extra.yaw`: Cardinal yaw (0, 90, 180, or 270)26- `extra.direction`: Direction used2728Failure (`status: "failed"`):29- `reason`: One of `"invalid_direction"`, `"status_failed"`, `"snapto_failed"`3031## Invariants3233- Always results in cardinal yaw (0, 90, 180, 270)34- Always snaps to block center: `(floor(x)+0.5, y, floor(z)+0.5)`35- Always sets pitch to 0°36- Never changes block position (orientation + centering only)3738## Planning Notes3940- Use `nav-turn` before movement to change direction41- Use `forward` to align to nearest cardinal without rotation42- Compose with `nav-move`, `nav-climb`, `nav-descend` for navigation sequences4344## Example Workflow4546```json47{"type":"nav-turn","direction":"right","out":"$turn"}48{"type":"nav-move","out":"$m1"}49{"type":"nav-move","out":"$m2"}50{"type":"nav-turn","direction":"left","out":"$turn2"}51```