What it does
- Unreachable target cache — when a mob's A* search exhausts its budget without getting anywhere, retries against that target are skipped for 10 seconds. Cached per mob, and entries are dropped the moment a block changes in the target's chunk, so opening a door or placing a bridge takes effect immediately
- Pathfinding throttle — at most 4 path computations start per server tick (configurable), which flattens spikes like the villager dawn rush
- Search depth cap — A* is capped at 400 visited nodes; failed searches are what burn CPU (800+ nodes), successful village-scale paths rarely exceed 300
- Recompute cooldown — after a failed pathfind, mobs wait 60 ticks before retrying instead of vanilla's 20
- Reduced path recompute at distance — mobs 48+ blocks from every player refresh in-progress paths at most every 60 ticks
- AI tick reduction at distance — mobs 48+ blocks from every player run their AI decisions every 4th tick, staggered across mobs: goal and target selectors for animals and monsters, and brains for idle or resting villager-type mobs. Navigation, sensing, and movement controls still run every tick, so mobs keep moving smoothly along their paths
Safety rules that apply everywhere:
- Mobs within 48 blocks of a player always behave exactly like vanilla
- Urgent mobs — with an attack target, or hurt in the last 10 seconds — bypass everything and get full-rate, full-budget vanilla pathfinding
- Mobs in water or lava are never AI-throttled, so they keep swimming and never drown
- Brains running anything other than idle/rest (working, panicking, or modded custom activities) always tick at full rate
- No vanilla objects are cached or reused — the mod only records "this target dead-ended" timestamps, so it cannot hand a mob stale navigation state
Compatibility
- Lithium optimizes different layers (it makes each A* node evaluation cheaper; Pathfinder reduces how often and how deep A* runs). They can be used together.
- The goal-selector hook uses MixinExtras
@WrapOperation, so other mods wrapping the same calls chain cleanly instead of conflicting. - Pathfinder injects into
PathNavigation.createPath,PathNavigation.recomputePath,Brain.tick,Mob.serverAiStep, andLevel.setBlock.
Credits
This mod took heavy inspiration from Pathwright, a recent pathfinding optimization for Minecraft 26.1.2 mod.

