Villager Brain Configuration
A lightweight and highly optimized mod that provides complete control over villager pathfinding behavior. You can finely tune how exactly villagers move through your world.
Main Features
Individual Block Settings Configure villagers' attitude towards different block types during pathfinding. Each block can be assigned its own traversal difficulty coefficient, with support for block and item tags.
Professional Preferences Create unique routes for different villager professions. Fishermen can move freely through water, while farmers can traverse farmland.
Efficient Caching The system caches pathfinding results for maximum performance, which is especially important with large numbers of villagers.
Mod Support The configuration file works with any blocks and professions from other mods.
Practical Applications
- Protect villagers from dangerous blocks: campfires, magma, and traps
- Create specialized routes for professions
- Design villages with optimized navigation
- Prevent villagers from wandering outside designated areas
- Give uniqueness to each profession type
Pathfinding Visualization
Smart villager chooses the shortest path to workplace
Stupid villager goes off-screen to reach workplace
Planned Features
- Rules for different villager types (e.g., plains villagers, taiga villagers)
Performance
Villager Brain Configuration is designed for minimal performance impact or even faster performance compared to vanilla.
Test Scenario
- 250 villagers
- Each finding path to unique workplace in grid
- Comparison of vanilla and modified versions using Spark profiler
Results
Vanilla Logic

Modified Logic

Total Mod Time

Configuration
All settings are in the villager-brain-config.json file in the configuration folder.
{
"walk_on_block_penalties": {
"minecraft:grass_block": 4.0,
"minecraft:dirt_path": 0.0,
"default": 5.0
},
"walk_through_block_penalties": {
"minecraft:lava": -1.0,
"minecraft:tall_grass": 20,
"default": 0.0
},
"actions_penalties": {
"jump": 10.0
},
"professions": {
"minecraft:farmer": {
"walk_on_block_penalties": {
"minecraft:farmland": 0.0,
"minecraft:grass_block": 2.0
}
},
"minecraft:fisherman": {
"walk_on_block_penalties": {
"minecraft:water": 0.0
},
"walk_through_block_penalties": {
"minecraft:water": 0.0
}
}
},
"avoids": [
{
"block": "minecraft:lava",
"radius": 3,
"penalty": -1.0
}
]
}