Villager Brain Configuration
A highly optimized server-sided mod that allows full configuration of villager pathfinding malus
介绍
Villager Brain Config
A lightweight, highly optimized mod that makes villager pathfinding behavior fully configurable
Features
- Per-block malus control Customize how villagers treat different blocks in pathfinding. Blocks are configurable to any malus, block and item tags supported
- Profession-based malus Configure different path preferences per villager profession.
- Global block penalty caching Pathfinding results are cached for maximum efficiency across multiple villagers
- Native modded support The config file supports any modded blocks or professions
Example Use Cases
- Prevent villagers from walking into trap blocks like campfires or magma
- Make water paths viable for fishermen only
- Design custom village layouts with optimized navigation paths
- Prevent villagers from wandering off paths
- Add personality to each profession type
Pathfinding Visualizations
Smart villager takes the short path to get to his job site
Stupid villager walks off the screen to get to his job site
Planned features
- Per-villager-type rules (eg. plains villagers, taiga villagers)
Performance
Villager Brain Config is designed to be almost invisible in impact or even faster than vanilla
Test case
- 250 villagers
- Each pathing to a unique workstation in a grid
- Compared vanilla to modded using Spark profiler
Results
Vanilla Logic

Modded Logic

Mod total

Configuration
All settings are in a villager-brain-config.json file in the config 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
}
]
}
常见问题
Villager Brain Configuration 支持哪些 Minecraft 版本?
Villager Brain Configuration 支持 Minecraft Java 版 1.21.1–1.21.8,共 8 个版本,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。
Villager Brain Configuration 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
joshieman 的其他作品
查看全部 →MVS – Moog’s Voyager Structures
为你的世界添加130+原版风格结构,让世界生机勃勃,全部使用原版方块。包含地牢和可战斗的敌人!
MES – Moog’s End Structures
大量原版风格的结构,为末地维度增添生机!
Tidal Towns
几块浮木聚集在一起,组成了一个漂浮在海浪上的村庄。
Blossom Blade
插在基座上的剑散发着神圣的光芒,每次挥动都伴随着樱花的芬芳。
评论
登录后评论和评分