[MC-379] spawn-animals and spawn-npcs=false removes all villagers and prevents summoning new mobs Created: 25/Oct/12  Updated: 03/Sep/24  Resolved: 14/Aug/24

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, 20w14a, 1.16.3, 21w05b, 21w06a, 21w07a, 21w08a, 21w08b, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 2, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Pre-release 5, 1.17, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w43a, 1.18, 1.18.1, 22w06a, 1.18.2, 22w13a, 22w16b, 1.19 Pre-release 4, 1.19.3, 23w03a, 23w04a, 1.20.4, 24w12a
Fix Version/s: 24w33a

Type: Bug
Reporter: iliketra1ns Assignee: Unassigned
Resolution: Fixed Votes: 20
Labels: npc, server, villager
Environment:

Windows 7 64 bit, Java 1.7.0_07 64 bit


Issue Links:
Duplicate
is duplicated by MC-20766 Horses despawning immediately after s... Resolved
is duplicated by MC-52087 SMP - Passive Mobs (Animals) can't be... Resolved
is duplicated by MC-63676 summon does not override server.prope... Resolved
CHK:
Confirmation Status: Confirmed
Category:
Mob spawning
Mojang Priority: Low
Area: Platform

 Description   

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.



 Comments   
Comment by Mudassar Khan [ 03/Sep/24 ]

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?

Comment by Brain81505 [ 05/Jul/23 ]

Can confirm in 1.20.1

Comment by Brain81505 [ 01/Feb/23 ]

Can confirm in 23w06a

Comment by Brain81505 [ 25/Jan/23 ]

Can confirm in 23w04a

Comment by Brain81505 [ 18/Jan/23 ]

Can confirm in 23w03a

Comment by Brain81505 [ 14/Jan/23 ]

Can confirm in 1.19.3

Comment by user-f2760 (Inactive) [ 06/Sep/21 ]

/summon or spawn egg.

Comment by Seungwoo Ryu [ 06/Sep/21 ]

uhhhhh
how to spawn a mob when spawn-monsters off?
I don't want natural generated mobs, just custom ones

Comment by Jack Woodhead [ 13/Jul/21 ]

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?

Comment by Marty McFly [ 04/Feb/21 ]

Affects 21w05b

Comment by EvilSeph (Warren Loo) [ 06/Nov/12 ]

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

Comment by GrygrFlzr [ 25/Oct/12 ]

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

Comment by sterlingred [ 25/Oct/12 ]

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

Generated at Sun Jan 12 11:50:49 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.