If you summon an entity with a passenger entity with a passenger boat like so:
/summon Zombie ~ ~ ~ {Passengers:[{id:"Zombie",Passengers:[{id:"Boat"}]}]}
Any server will crash if the first entity is able to sit in a boat. So for example if you use this command:
/summon Squid ~ ~ ~ {Passengers:[{id:"Zombie",Passengers:[{id:"Boat"}]}]}
It will not crash.
The only possible explanation I can think of is that the boat is trying to pull the lower entity on it, but because it's technically riding it, it can't. It's constantly trying to do this over and over again which causes the crash. The boat wont try to pull the entity it's riding on in however.
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 1
Attachments
Comments 13
It is not the client that crashes. It's the server. You'll see, if you try it in singleplayer, that no server-sided actions will happen. Command don't work, items don't come when you break blocks, entities don't move, etc. The server logs aren't very helpful either. It just says: [Server thread/INFO]: [@: Object successfully summoned]
Before having this issue: Please force a crash by holding F3+C for 10 seconds and attach the resulting crash report here.
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The reason why this happens is because the boat picks up the lowest zombie. This creates an infinite riding cycle.
Something similar happens when two mobs with a boat as a passenger each collide. I do not know why their collision boxes intersect though.
The problem is that the method net.minecraft.entity.Entity.startRiding(Entity, boolean)
does not test whether the entity it should ride is a passenger.
public boolean startRiding(Entity entityIn, boolean force)
{
// Added this
Entity entity;
for (entity = entityIn; entity.isRiding(); entity = entity.getRidingEntity()) {
if (this.equals(entity)) return false;
}
if (this.equals(entity)) return false;
if (force || this.canBeRidden(entityIn) && entityIn.canFitPassenger(this))
{
if (this.isRiding())
{
this.dismountRidingEntity();
}
this.ridingEntity = entityIn;
this.ridingEntity.addPassenger(this);
return true;
}
else
{
return false;
}
}
Can you attach the crash report?