-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.11.2, Minecraft 17w06a, 20w07a, 1.16.3, 21w05b
-
Confirmed
-
(Unassigned)
Based on 1.11.2 decompiled using MCP 9.35 rc1; Code analysis potentially outdated
The bug
Mob spawners do not test if the entity to spawn collides after calling net.minecraft.entity.EntityLiving.onInitialSpawn(DifficultyInstance, IEntityLivingData) (respectively the methods overriding it). This could result in mobs suffocating if the method onInitialSpawn changed their position.
Note: For naturally spawned mobs this is tested.
How to reproduce
- Encase a chicken and place directly above it a repeating command block
teleport @e[type=zombie,distance=2..] ~ -255 ~
- Create a spawner 4 blocks horizontally away
/setblock ~ ~ ~ spawner{MaxSpawnDelay:5s,MinSpawnDelay:5s,SpawnCount:255s,RequiredPlayerRange:16s,SpawnRadius:1s,MaxNearbyEntities:255s,SpawnData:{id:"zombie"}}
At some point a baby zombie starts riding the chicken even if there is not enough space above causing the zombie to suffocate