Skip to main content

BTCMobs Custom AI

BTCMobs allows you to customize the AI behavior of your mobs using AI Goals and AI Target Selectors.

How AI Works

Mobs in Minecraft have two types of AI:
  • Goal Selectors - Define what actions the mob takes (attack, move, flee, etc.)
  • Target Selectors - Define how the mob chooses targets

Configuration

In your mob configuration file, use the AIGoalSelectors and AITargetSelectors sections:
ExampleMob:
  Type: ZOMBIE
  AIGoalSelectors:
    - clear
    - meleeattack
    - randomstroll
    - lookaround
  AITargetSelectors:
    - clear
    - players
    - hurtby

Clearing Default AI

Use clear as the first entry to remove all vanilla AI before adding custom goals:
AIGoalSelectors:
  - clear           # Removes all vanilla goal selectors
  - meleeattack     # Add custom goals after clearing

Goal Priority

Goals are processed in order of priority (lower = higher priority). If no priority is specified, it auto-increments starting from 0:
AIGoalSelectors:
  - clear
  - float 0         # Priority 0 (highest)
  - meleeattack 1   # Priority 1
  - randomstroll 2  # Priority 2

Goal Parameters

Many goals accept parameters in curly braces:
AIGoalSelectors:
  - meleeattack{speed=1.5;range=2.0}
  - fleeplayers{range=16;speed=1.2}

See Also