mojira.dev
MC-379

spawn-animals and spawn-npcs=false removes all villagers and prevents summoning new mobs

Setting spawn-npcs=false in server.properties disables villagers completely
Setting spawn-animals=false prevents any mob from being spawned by commands or mob spawners.

What I expected to happen was...
Villagers and animals to stop naturally spawning.
Mobs to still be allowed to be summoned via commands

What actually happened was...
ALL Villagers, including pre-existing ones in the world, or ones newly placed via spawn eggs, disappear instantly.

Steps to Reproduce:

  1. Run a server

  2. Change server.properties to:

    spawn-npcs=false
    spawn-animals=false
    spawn-monsters=false
  3. Join the server and execute the following commands

    /summon villager
    /summon wolf
    /summon zombie

With difficulty on non-peaceful, you can see the Zombie summons fine. But the Villager and Wolf do not stay in the world.

For custom maps, commands should override any server.properties as it does with hostile mobs.

Linked issues

Comments 13

The option functions as intended. It disables the mob completely. This is how the other mobs a work as well.

Even if it is intended, the option name is misleading - it should be enable-npcs, not spawn-npcs.

Other settings named along the same lines (spawn-animals, spawn-monsters) works the same way.

I experience the same as OP where spawn-monsters still allows hostile mobs to exist in the world while spawn-npcs and spawn-animals immediately delete their respective entities. There is definitely unintentional behavior going on here. Did these options all get added in the same update?

3 more comments

Can confirm in 23w03a

Can confirm in 23w04a

Can confirm in 23w06a

Can confirm in 1.20.1

Wait what....

You resolved spawn-animals bug option by just removing the feature altogether?

We have been using this feature for 10+ years. How would we disable animals now?

GrygrFlzr

iliketra1ns

(Unassigned)

Confirmed

Platform

Low

Mob spawning

npc, server, villager

Minecraft 1.4.2, 20w14a, 1.16.3, 21w05b, 21w06a, ..., 1.19.3, 23w03a, 23w04a, 1.20.4, 24w12a

24w33a

Retrieved