Villager Overhaul

Custom Commands

Custom Commands let you teach a recruited villager a routine, save it, and trigger it later through chat.

This is separate from the player-wide chat command panel, but both systems use chat phrases.

Teaching Flow

  1. Open the villager UI.
  2. Use Teach in the Custom Commands area.
  3. Record steps while the villager follows you.
  4. Right-click the villager to open the teach menu.
  5. Add actions.
  6. Finish teaching and save the command metadata.

Villagers can store up to 64 taught actions. Each action can contain up to 128 steps.

Step Types

StepWhat It Records
WaypointThe block position you are standing on.
Interact blockA target block right-click.
Interact entityA target entity right-click.
Withdraw chestA chest-like storage target plus item count rules.
Deposit chestA chest-like storage target plus item count rules.
WaitA delay in seconds.
LookA yaw/pitch direction and optional duration.

Chest-like targets include chests, trapped chests, barrels, and ender chests.

Action Metadata

Each taught action stores:

  • Title.
  • Description.
  • Chat command phrase.
  • Case sensitivity.
  • Chain toggle.
  • Anyone toggle.
  • Combat override toggle.
  • Timeout seconds.
  • Retry-after seconds.
  • Stop-after-retries count.
  • Recorded steps.

Descriptions are capped to keep saved data and UI manageable.

Chat Matching

Command phrases support more than exact text.

PatternBehavior
helloExact match.
hello##hiMultiple exact options.
$$word$$Message contains word.
$$one&&two$$Message contains both one and two.

Case sensitivity is controlled per action.

tip

Use exact phrases for commands that should not trigger accidentally. Use contains patterns only for natural-language behavior.

Running a Taught Command

When a chat message matches a taught command:

  • The villager starts executing the saved steps.
  • Waypoints use villager-like movement.
  • The villager looks at targets and performs simple visual delays.
  • Chest steps move configured item counts.
  • Wait steps pause for their saved duration.
  • Combat can interrupt the routine.
  • After combat, the villager can resume.

Timeouts and Retries

Each action has timeout and retry behavior.

  • If a step cannot complete before timeout, the action fails.
  • Retry-after controls when it may run again.
  • Stop-after-retries controls whether repeated failures stop the action instead of looping forever.
  • Failure state is stored on the villager.

Listen and Pass Settings

Each villager has chat command listening settings.

SettingBehavior
Listen to chat commandsLets the villager react to matching chat commands.
Pass chat commandsLets the villager relay commands onward.
Pass rangeControls how far relayed commands can reach.

Chaining lets command behavior spread through nearby recruited villagers when configured.

Player Chat Commands

The player-wide Chat Commands screen is opened with an unbound keybind by default.

It can bind phrases for:

  • Help.
  • Equip.
  • Stash.
  • Neutral.
  • Idle.
  • Follow.
  • Patrol.
  • Manual Farming.
  • Flee.
  • Defend.
  • Aggressive.

Mode phrases set that mode. If the villager is already in that mode, nothing needs to change.

Help

Help puts nearby recruited villagers into Help combat mode.

  • It uses your recent combat context.
  • If you recently attacked or were attacked, villagers use that target.
  • If there is no target, they rally near you for a short time.

Equip and Stash

Equip and Stash control combat loadout hands.

  • Equip moves stored combat loadout items into real hands.
  • Stash moves real hand items back into stored loadout.
  • These commands are blocked while Manual Farming or Neutral behavior would conflict.
  • Later module behavior may overwrite the hand state when it needs tools or weapons.

Chat Range

Custom command chat triggers use the configured custom commands radius. The default runtime value is 26 blocks.

Localized chat prefixes are stripped before command matching, so whisper/shout syntax does not become part of the command phrase.

Technical note: ownership

Custom command editing is owner-focused. The action metadata includes an Anyone flag for execution behavior, but teaching and management are meant to be controlled by the owner.

Support This Project

Like this wiki and these mods?

Every bit of support helps me keep building features, writing docs, and shipping updates.

Back to top