Skip to content

Jumping, Climbing and Doors

Alexander Parent edited this page Jul 31, 2026 · 1 revision

Jumping, Climbing and Doors

All three are opt-in and never inferred from terrain. A mob does them because you said so.

Platform jumping

Independent of ordinary step height.

PlatformJumpCapabilities jump = PlatformJumpCapabilities
        .acrossGaps(2)      // two unsupported cells
        .withRise(1)
        .withDrop(2);

NavigationProfile jumping = base.withGroundCapabilities(
        base.groundCapabilities().withPlatformJump(jump));

Per request instead of per mob:

controller.moveTo(target, NavigationModifiers.builder()
        .platformJump(jump)
        .build());

PlatformJumpCapabilities.builder() names every limit when the factories do not cover it.

  • A distance of two crosses exactly one unsupported cell.
  • One atomic JUMP edge is emitted; the bounding box is validated along the arc, arc length is charged to the budget, and the world is rechecked immediately before launch.
  • Distance is measured between graph anchors (minimum footprint corners), so a multi-cell footprint must add the cells it straddles: a 2x2 mob crossing two cells travels three anchors.
  • Edges are generated only for open gaps with full-block takeoff and full-footprint landing. Carpets, slabs, stairs, snow, walls and doors stay ordinary walk and step edges.
  • A partial route ends on a supported landing, never a midair sample.

Planned climbing

Vanilla ground A* generates no vertical edges through ladders, vines, scaffolding or aligned open trapdoors, so built-in profiles keep this off.

controller.moveTo(target, NavigationModifiers.builder()
        .climbables(ClimbableCapabilities.bothDirections(1.0))
        .build());

ascendOnly(...) and descendOnly(...) restrict direction; each takes the vertical edge-cost multiplier. Plans contain CLIMB nodes and pass straight to controller.follow(plan). Entry, vertical motion, top exit, broken columns, direction restrictions, ladder-facing offsets and the bounding box are all validated.

Doors and gates

STANDARD matches vanilla exactly: open doors, never close them.

MobTraversalProfile polite = MobTraversalProfile.builder("polite")
        .from(base.mobProfile())
        .blockManipulation(BlockManipulationCapabilities.STANDARD.closingBehind())
        .build();

Trapdoors, fence gates and closing behind are explicit extensions. Iron doors and iron trapdoors are never manipulated, and a door left outside the configured close range is forgotten rather than closed.

Clone this wiki locally