The bug
Spider and chicken jockeys only spawn the additional mob. This means spider jockeys will only spawn the skeleton and chicken jockeys only the chicken respectively set the IsChickenJockey
tag of a nearby chicken to true
without a zombie spawning on it.
How to reproduce
Create a Superflat world with the following preset to only allow spiders to spawn
3;minecraft:stone,minecraft:air,minecraft:glass;1;
Set the time to night
Use the following command to get to a nearby skeleton spawned as a spider jockey
/tp @p @e[type=skeleton,c=1]
→ You will see that the skeleton is not riding a spider
Code analysis
Based on 1.11.2 decompiled using MCP 9.35 rc1
It looks like the method net.minecraft.world.World.checkNoEntityCollision(AxisAlignedBB, Entity)
is not working correctly and counts entities riding the same entity as colliding while it should ignore them. See also net.minecraft.world.World.getCollisionBoxes(Entity, AxisAlignedBB)
.
/**
* Returns true if there are no solid, live entities in the specified AxisAlignedBB, excluding the given entity
*/
public boolean checkNoEntityCollision(AxisAlignedBB bb, @Nullable Entity entityIn)
{
List<Entity> list = this.getEntitiesWithinAABBExcludingEntity((Entity)null, bb);
for (int i = 0; i < list.size(); ++i)
{
Entity entity = (Entity)list.get(i);
// Replaced this
// if (!entity.isDead && entity.preventEntitySpawning && entity != entityIn && (entityIn == null || entity.isRidingSameEntity(entityIn)))
if (!entity.isDead && entity.preventEntitySpawning && entity != entityIn && (entityIn == null || !entity.isRidingSameEntity(entityIn)))
{
return false;
}
}
return true;
}
Linked issues
is duplicated by 1
relates to 2
Attachments
Comments 26
The resolution was "Awaiting Response". It wasn't closed as invalid or fixed. As you've provided more information, the resolution was removed accordingly.
Hey there Ray, I've been following this bug since a while because I also spotted what was happening while trying to collect jockeys for my mob collection. Recently started a new world, 1.12.2, completely vanilla with the exception of Optifine and during the nights this happened
[media]. No spawners, no mods, no tinkering. Any idea how? I've been seing so many lone chickens in caves and the nether and now.. this.
Confirmed for 18w11a, although the description on how to reproduce needs some slight updating, so here:
Create a Superflat world with the following preset to only allow spiders to spawn
minecraft:stone,minecraft:air,minecraft:glass;1;
Set the time to night
Use the following command to get to a nearby skeleton spawned as a spider jockey
/tp @p @e[type=skeleton,limit=1]
If that command fails, use the following command to let new mobs spawn, then try the above command again
/kill @e[type=!player]
→ You will see that the skeleton is not riding a spider
I'm not sure I understand the issue. Why couldn't the skeleton have spawned on its own? Is this a superflat world with only a 1 high space? In that case, please provide the preset.