-
Notifications
You must be signed in to change notification settings - Fork 0
Jumping, Climbing and Doors
All three are opt-in and never inferred from terrain. A mob does them because you said so.
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
JUMPedge 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.
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.
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.
Start here
Shaping behaviour
Going deeper
Reference