Skip to content

Terrain and World Changes

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

Terrain and World Changes

What is walkable

Hazards are avoided without being asked: cactus, fire, magma, campfires, berry bushes and wither roses.

Walkability comes from real collision geometry, not a block list: a state is pathfindable unless its collision shape is a full cube. Crops are walkable — wheat, carrots, potatoes and beetroots are open ground, and a berry bush is priced rather than closed.

Minestom's own navigator reports the opposite in #3224 and #2813, where mobs get stuck on crops. CropTraversalE2ETest walks ticked mobs through a planted field so that cannot regress here.

Abilities are never inferred from terrain. Step height, safe fall distance and diagonal movement are explicit values.

TerrainType holds all 27 Minecraft 26.2 path types and their default costs; mob profiles override them per family.

Replanning when the world changes

A route is planned against the world as it was.

navigation.watchBlockChanges(instance);

Every route the system owns that a changed block may cross is replanned. Each controller decides whether the block is near enough to the stretch it has left to walk, so this is cheap even on a busy server.

If you already have block-change plumbing:

navigation.notifyBlockChanged(point);

Watch it happen:

navigation.eventNode().addListener(RouteReplanEvent.class, e -> {
    if (e.reason() == RouteReplanEvent.Reason.BLOCK_CHANGE) log(e.getEntity());
});

Block tags

Tag membership comes from Minestom's own block registry, so it is whatever the linked Minestom version says it is.

BlockTagIndex.contains("climbable", block);
BlockTagIndex.contains(Key.key("minecraft", "fences"), block);

Clone this wiki locally