Download Villager Brain Configuration — Minecraft Mods — MetaMods

Villager Brain Configuration

Active

Downloads

0

Last update

3 months ago

Versions

1.21.1 — 1.21.8
Server
Fabric
Neoforge
Game mechanics
Mobs
Game optimization
Utils

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

Smart villager chooses the shortest path to workplace


Stupid villager goes off-screen to reach 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

Vanilla: VillagerEntity.tick(): 7.42

Modified Logic

Modified: VillagerEntity.tick(): 5.68

Total Mod Time

villager-bran-config: 1.75ms

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
    }
  ]
}
Project members
joshieman

joshieman

Developer

Created: 31 Jul 2025

ID: 257763