Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Fix spawn-animals and spawn-monsters settings

Open Machine-Maker opened this issue 2 years ago • 3 comments

There are a few things this fixes. Craftbukkit attempted to move the logic regarding the spawn-monsters, spawn-npcs and spawn-animals server.properties settings to the logic for calling the entity spawn events. This broke quite a bit with regards to vanilla behavior.

  1. The spawn-monsters setting should only affect natural spawns, not any other method of spawning (summon command, spawn eggs).
  2. The spawn-animals setting should only affect instances of nms.Animal and nms.WaterAnimal, not nms.AbstractGolem.
  3. Fixes an issue with entity loading due to chunk loading not respecting the per-world nature of spawn-animals

Machine-Maker avatar Dec 21 '22 18:12 Machine-Maker

Rebased for 1.19.4

Machine-Maker avatar Mar 20 '23 09:03 Machine-Maker

https://bugs.mojang.com/browse/MC-379 There is a super old confirmed report saying the spawn-animals and spawn-npcs should function the same way as spawn-monsters in only preventing the natural generation of monsters, not spawn eggs, commands, etc.

This would be a relatively large behavioral change that is > 10 years old where spawn eggs for monsters on servers spawn-monsters: false would suddenly start working.

Machine-Maker avatar Dec 27 '23 23:12 Machine-Maker

1.21.2 has removed spawn-animals and spawn-npcs, so this is blocked until that is merged. This pr will likely condense down into only fixing the spawn-monsters inconsistencies with vanilla.

Machine-Maker avatar Sep 23 '24 23:09 Machine-Maker