Home›Java›Mods›Encounter: Mob AI Tweaker
Encounter: Mob AI Tweaker
ModsJava

Encounter: Mob AI Tweaker

Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.

by hakujoucho · on CurseForge

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21.1 · NeoForge⬇ Download for 1.20.1 · Fabric⬇ Download for 1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Introduction

Occasionally, the attack/flee AI behavior of certain mobs may not align with the modpack creator’s intended design, as mod authors cannot take all possible mod combinations into consideration.

For example, modA adds new monsters, while modB adds some NPCs and animals. However, when you put these two mods together into your modpack, monsters from modA show no interest in chasing modB's NPCs and animals……

In case of that, with this mod, Developers can configure the list of mobs that specific entities will attack or flee from via the configuration file (located at config/encounter), and the changes support hot-reloading for seamless adjustments.

Example: The Villager is running away from the Sheep

Configuration File

    {
      "entity_id": "example:entity_1",
      "avoid": [
        "example:avoid_1",
        "example:avoid_2"
      ],
      "hostile": [
        "example:hostile_1",
        "example:hostile_2"
      ]
    },
 
Add registry name (minecraft:zombie etc.) to the config file, then /reload or re-open the save to apply the tweaks.

Note

  1. You can include this mod in your modpack.
  2. Passive mobs (e.g., villagers) cannot attack, even if hostile targets are added to their AI.
  3. Slimes cannot deal damage to added hostile targets for unknown reasons.
  4. Hot-reloading might not apply to mobs already spawned in the world. Changes will take effect on newly spawned mobs.
  5. Villager AI is unique: If you revert changes to their flee behavior, a game restart is required to stop them from fleeing previously configured targets.
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more