Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details
🧠 Villager Pathfinding Fix
Make your villagers smarter, safer, and less annoying.
Are you tired of villagers getting stuck on open doors? Do they constantly shove each other into corners until they suffocate? Do they just stand there and accept their fate when a Zombie attacks?
Villager Pathfinding Fix is a server-side logic overhaul for Fabric (1.21+) that solves the biggest frustrations in village management. It doesn't add new items or blocks—it just fixes the brains of the villagers you already have.
✨ Key Features
🚪 Smart Door Handling
Vanilla villagers only check if a door state is "Open". This mod changes that. Villagers now check the physical collision box of the block in front of them.
- Fixes "Glitched" Doors: Villagers can now open and pass through doors placed sideways or in complex redstone configurations that usually break vanilla AI.
- No More Door Spam: If a group of villagers is passing through a door, the first one opens it, and they keep it open until the last one passes. No more slamming doors in each other's faces.
🚦 Traffic Control (Yielding)
Villagers are notoriously rude. When two of them try to fit through a 1-block gap, they usually push each other endlessly.
- The "After You" Logic: When two villagers collide while trying to move, the mod detects the conflict.
- Yielding: One villager (based on entity ID) will stop pathfinding, wait, and get slightly nudged back to let the other pass.
🛡️ Advanced Panic & Defense
Villagers are no longer helpless victims. This mod implements a "Hierarchy of Fear" that makes them actively seek survival.
1. Chain Reaction: If one villager gets hit, they scream (figuratively). All other villagers within a 15-block radius immediately enter panic mode, even if they didn't see the attacker.
2. Seek the Golem (Snitching): Instead of running blindly, panicked villagers scan for an Iron Golem within 50 blocks.
- If found, they run towards the Golem for protection.
- The Snitch Mechanic: The villager tells the Golem who attacked them. The Golem will immediately target the attacker, even if the Golem wasn't hit itself.
3. Active Fleeing: If no Golem and no Bed are found, the villager calculates a vector directly away from the attacker and sprints for safety.
🧩 Stuck Detection
Sometimes, Minecraft just breaks.
- If a villager tries to move but fails to leave their block for 3 seconds (60 ticks), the mod forces a "Memory Wipe" of their current path.
- They will immediately recalculate a fresh path, often freeing themselves from corners or fences.
⚙️ Technical Info
- Loader: Fabric
- Minecraft Version: 1.21+
- Side: Required on Server (Optional on Client).
- Compatibility: Should be compatible with most modded villagers, provided they use the standard
VillagerEntityclass or inherit from it.
📦 Modpacks
You are free to use this mod in any modpack!
Found a bug? The villagers are plotting a revolution? Report it on the Issues page!


