Skip to content

Seeing the Path

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

Seeing the Path

"Why did it walk there?" is a question you can answer by looking.

PathDebugRenderer renderer = new PathDebugRenderer();

// From the tick thread, as often as you want to see it.
renderer.render(controller);

Nodes are coloured by role:

Colour Meaning
WAX_ON already walked
HAPPY_VILLAGER still to walk
FLAME the node it is heading for now
ELECTRIC_SPARK reached by a jump or a climb

Pick your own particles and density:

new PathDebugRenderer(
        Particle.CRIT,            // walked
        Particle.END_ROD,         // remaining
        Particle.SOUL_FIRE_FLAME, // current
        Particle.COMPOSTER,       // jump or climb
        2);                       // particles per node

Drawing a plan you have not followed yet

NavigationPlan plan = navigation.plan(request).join();
renderer.render(instance, plan);

Only while debugging

Particles go to everyone who can see the instance, and it is one packet group per node. Render the mob you are investigating, not all of them:

navigation.eventNode().addListener(PathComputedEvent.class, e -> {
    if (e.getEntity().getUuid().equals(watched)) renderer.render(e.controller());
});

Nothing about navigation depends on the renderer; it reads the published route and sends particles.

Clone this wiki locally