Mojira Archive
MC-114017

Naturally spawning baby ocelots prevent parent ocelot from spawning

The bug

Baby ocelots spawned naturally prevent the parent ocelot from spawning.

Note: This bug is currently blocked by MC-103516 which allows the parent ocelot to spawn.

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. Setup a repeating command block and two chain command blocks behind it with the following commands
    /execute as @e[type=!player] if entity @s[type=!ocelot] run kill
    
    /execute as @e[type=ocelot] run data modify entity @s NoAI set value 1b
    
    /execute as @e[type=ocelot,nbt={Age:-24000}] run data modify entity @s Glowing set value 1b
    
  3. Move around and look at the naturally spawned baby ocelots
    → You will notice that they are always spawned without parent

Code analysis

Outdated


Based on 1.11.2 decompiled using MCP 9.35 rc1

The problem is that the method net.minecraft.entity.passive.EntityOcelot.onInitialSpawn(DifficultyInstance, IEntityLivingData) spawns the baby ocelots at the same position the parent ocelot would spawn. Because of that the parent would collide with them and is therefor not spawned.

Cannot Reproduce

Marcono1234

2017-02-19, 08:11 PM

2019-11-06, 01:37 AM

2019-11-06, 01:36 AM

2

2

Confirmed

(Unassigned)

baby, collision, ocelot, spawning

Minecraft 1.11.2, Minecraft 17w06a

-