How to Make Mob Categories

A category is a config file that controls how a group of mobs spawns. Every mob belongs to one category, which decides whether mobs of that category appear naturally, how (by replacing vanilla mobs or through EcoMobs' own custom spawning), and whether they persist. This page covers building a category, naming it, and every part of its config.

Quick start

  1. Open plugins/EcoMobs/categories/ and copy _example.yml, renaming it to your category's ID, e.g. common.yml. The file name (without .yml) is the category ID.

  2. Pick a spawning type: replace, custom, or none.

  3. Fill in the matching block (the replace mobs and chance, or the custom spawn types, conditions, and chance).

  4. Set persistent to control whether these mobs despawn naturally.

  5. Set category: <id> on a mob, run /ecomobs reload, and confirm the mob spawns the way the category defines.

Naming and IDs

The category's file name without .yml is its ID. This is the value you put under category: when creating a mob.

The structure of a category

A category config has two parts.

PartWhat it controls
SpawningHow mobs of this category enter the world
DespawningWhether mobs of this category persist

Here is a complete category:

# === Spawning: how mobs of this category appear ===
spawning:
  type: custom # replace, custom, or none
  replace: # Used when type is replace
    replace: # Vanilla mobs to replace
      - zombie
      - skeleton
    chance: 100 # Percent chance to replace the vanilla mob when it spawns
  custom: # Used when type is custom
    spawn-types: # Choose from land, water
      - land
    conditions: [ ] # Conditions the location must meet to spawn
    chance: 1.5 # Percent chance to spawn when a valid point is found

# === Despawning: whether mobs persist ===
persistent: false # If true, mobs of this category never despawn naturally

Spawning

The type field picks one of three spawning methods, and you fill in the matching block.

replace uses the vanilla spawning system, swapping the listed vanilla mobs for your custom mob when they spawn:

spawning:
  type: replace
  replace:
    replace: # Vanilla mobs to replace
      - zombie
      - skeleton
    chance: 100 # Percent chance to replace the vanilla mob when it spawns

custom uses EcoMobs' own spawning system, spawning the mob wherever a valid point matches your conditions:

spawning:
  type: custom
  custom:
    spawn-types: # Choose from land, water
      - land
    conditions: [ ] # Conditions the location must meet to spawn
    chance: 1.5 # Percent chance to spawn when a valid point is found

none disables natural spawning entirely, for mobs you only summon via commands, eggs, or totems:

spawning:
  type: none

Despawning

Set whether mobs of this category stay loaded or despawn like vanilla mobs.

persistent: false # If true, mobs of this category never despawn naturally

Where to go next

  • Make a mob: How to Make a Custom Mob and point its category at this file.

  • Conditions: Configuring a Condition for custom spawning rules.

  • Default configs: browse the shipped examples here, and community configs on lrcdb.