onInitialSpawn modifies world even if mob was not spawned
The bug
The method net.minecraft.entity.EntityLiving.onInitialSpawn(DifficultyInstance, IEntityLivingData) (respectively methods overriding it) modify the world even if the mob the method was called for was not spawned.
How to reproduce
This can currently be seen with MC-103516. The additional mob is spawned but the mob the method was called for is not spawned.
Affected classes
Based on 1.11.2 decompiled using MCP 9.35 rc1
| Class | Description |
|---|---|
| EntitySpider | Spawns skeleton 1 |
| EntityZombie | Spawns chicken or sets IsChickenJockey of existing chicken to true 1 |
| EntityOcelot | Spawns other ocelots |
1 Currently blocked by MC-111747 which describes that position and bounding box are not instantly updated when an entity starts riding another entity
2017-02-17, 11:44 PM
2019-11-06, 01:49 AM
2019-11-06, 01:46 AM
1
2
chicken, chicken-jockey, mob, ocelot, spawn, spider, spider-jockey, zombie
Minecraft 1.11.2, Minecraft 17w06a
-