mojira.dev
MC-161144

Baby ocelots don't spawn naturally

The bug

Baby ocelots are not spawning naturally anymore. Previously a parent ocelot was able to spawn with multiple babies.

How to reproduce

  1. Create a Superflat world with the following preset

    70*minecraft:stone,minecraft:grass_block;minecraft:jungle;

    Note: The 70 layers of stone are required because ocelots only spawn above sea level.

  2. Set up a repeating command block with the following command

    /execute as @e[type=ocelot,nbt={Age:-24000}] run say Found baby

Code analysis

19w44a:

It appears the behavior (and code) described in MC-114017 happens now reversed. The parent is spawned and afterwards no baby can be spawned because the parent occupies the space.

This might apply to all mobs which should naturally spawn babies: Panda, polar bear, rabbit and llama
Edit: This was incorrect. Since the babies are not spawned as part of finalizeSpawn, but instead are separate spawn attempts, their position is randomized as well.

Linked issues

Attachments

Comments 1

violine1101

Hmm. I was unable to get any ocelots to spawn whatsoever.

poweredbow

migrated

Confirmed

Normal

Mob spawning

ocelot

19w37a, 19w45b

1.15 Pre-release 3

Retrieved