Skip to content

Natural Spawning

Brennan Hatton edited this page Jun 24, 2026 · 1 revision

Natural Spawning

PlayerMobs can spawn in the wild as part of normal world generation and mob spawning — no spawn egg or /summon required. It's opt-in and off by default, configured entirely from config/playermob.properties and tunable live with the /playermob naturalspawn commands. No Java, no datapack.

Added in v0.51.0. Earlier versions had no natural spawning — PlayerMobs only appeared via spawn egg, /summon, or the Dungeon-Train event path.


The model: alongside, never replace

When a mob spawns naturally, PlayerMob rolls that mob's configured chance; on a hit it spawns a PlayerMob beside it. The original mob is never removed — a hit just adds one extra PlayerMob. So naturalSpawnScale.minecraft:cow=0.15 means "~15% of naturally-spawning cows also bring a PlayerMob along."

This applies to:

  • Natural spawns — the per-tick spawn cycle (e.g. night-time hostiles).
  • Chunk-generation spawns — the initial mobs/herds placed when terrain generates.
  • Mob spawners — dungeon/structure spawner blocks.
  • Villages — villagers (and structure-placed iron golems) are settled with PlayerMob companions at generation.

Enabling it

Edit config/playermob.properties (created on first run, in the server/world config directory) and set:

naturalSpawnEnabled=true

The config is read once at startup, so a file edit needs a server/client restart. To change things without a restart, use the commands below — they take effect immediately for the session.


Groups and default chances

Every supported mob belongs to a group, and each group has a default chance. The generated config writes one naturalSpawnScale.<id> line per mob at its group default, which you can edit individually.

Group Default Members
Hostile 0.0 zombie, zombie_villager, husk, drowned, skeleton, stray, bogged, creeper, spider, cave_spider, witch, slime, enderman, endermite, silverfish, phantom, pillager, vindicator, evoker, ravager, guardian
Nether 0.05 blaze, ghast, magma_cube, wither_skeleton, piglin, piglin_brute, hoglin, zombified_piglin, strider
Animals 0.15 cow, mooshroom, pig, sheep, chicken, rabbit, horse, donkey, llama, goat, frog, turtle, panda, polar_bear
Friendly 0.15 wolf, fox, ocelot, parrot, bat, bee
Water 0.0 squid, glow_squid, dolphin, axolotl, cod, salmon, pufferfish, tropical_fish
Villager 0.25 villager, iron_golem

Hostiles and water mobs default to 0 (off) — a player-shaped pillager underwater or replacing the whole night's mob budget is rarely wanted out of the box. Raise their group (or individual lines) to enable them.

How a mob's chance is resolved

  1. Natural spawning off0 (nothing spawns).
  2. An explicit naturalSpawnScale.<id> line (or a command override) → that value.
  3. Otherwise → the mob's group default.
  4. A mob in no group → 0.

All values are clamped to 0.01.0.


Config example

# Master switch (ships off)
naturalSpawnEnabled=true

# Per-mob lines are generated grouped, each at its group default:
# --- Hostile (0.0) ---
naturalSpawnScale.minecraft:zombie=0.0
# --- Animals (0.15) ---
naturalSpawnScale.minecraft:cow=0.15
# --- Villager (0.25) ---
naturalSpawnScale.minecraft:villager=0.25
naturalSpawnScale.minecraft:iron_golem=0.25

Edit any line to override that mob. Delete a line to fall back to its group default.


Commands

All under /playermob naturalspawn, op level 2 (gamemasters). These are session overrides — they take effect immediately, but are not written back to the config file (a restart reverts to the file).

Command Effect
/playermob naturalspawn Report the master switch + every group's default.
/playermob naturalspawn on | off Flip the master switch.
/playermob naturalspawn <mob> on Set one mob to its group default.
/playermob naturalspawn <mob> off Set one mob to 0 (never).
/playermob naturalspawn <mob> <chance> Set one mob to an explicit 0.01.0.
/playermob naturalspawn group <group> on Set every mob in the group to the group default.
/playermob naturalspawn group <group> off Set every mob in the group to 0.
/playermob naturalspawn group <group> <chance> Set every mob in the group to an explicit 0.01.0.

<mob> is an entity id (tab-completes the supported list, e.g. minecraft:zombie). <group> is one of hostile, nether, animals, friendly, water, villager.

# Turn it on and make every hostile bring a PlayerMob
/playermob naturalspawn on
/playermob naturalspawn group hostile 1.0

# But never from creepers specifically
/playermob naturalspawn minecraft:creeper off

# Halve the village companion rate
/playermob naturalspawn group villager 0.125

Setting a per-mob or group chance while the master switch is off is allowed and remembered, but won't take effect until /playermob naturalspawn on. The command tells you when that's the case.


Notes & limits

  • Additive, not a spawn-cap change. Companions are extra entities placed next to the rolled mob; they don't change vanilla spawn caps or where mobs spawn.
  • The companion is a normal PlayerMob — it rolls its own skin, personality, and gear (a fresh natural roll; it isn't an "echo" reincarnation).
  • Village iron golems spawned by the village population mechanic (over time, as villager count grows) use the MOB_SUMMONED reason and are not covered — only iron golems placed as part of structure generation are.
  • Thread-safe at world-gen. Chunk-generation and village placement run on a worldgen worker thread; the companion roll/spawn uses that context's RNG, so it's safe.
  • Mob ids not present in your Minecraft version (e.g. bogged before 1.21) simply never match — harmless to leave in the config.

See also

Clone this wiki locally