mojira.dev
MC-96499

Boats collide with any entity (Arrows, Paintings, etc.) even if Marker:1b is on (armor stand)

Boats will collide with Marker armorstands, invulnerable, invisible, no matter what will always collide.

Boats also collide with paintings, itemframes, arrows, etc. Non-living (non-mob) entities.

What should happen:
Should only collide with "living" entities, boats, nonmarker armorstands, players, and such.
Not with marker armorstands, arrows, items, itemframes, paintings.


Code analysis by @unknown can be found in this comment.

Related issues

Comments

migrated

I can't seem to reproduce this in 16w05b.

marcono1234

Confirmed for

  • 16w05b

You have to make sure that the Marker ArmorStand is not in the ground

Boats are probably only supposed to collide with all mobs and ArmorStands with Marker:0b

AgentM

EDIT made more accurate and added versions affected

SunCat

Still in 1.9.1-pre2

SunCat

Still in 1.9.1-pre3

marcono1234

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this happens is because the method net.minecraft.entity.item.EntityBoat.getCollisionBox(Entity) uses always the collision box of the passed entity, whereas for example the method net.minecraft.entity.item.EntityMinecart.getCollisionBox(Entity) (Minecart) only uses the collision box if the entity can be pushed.

/**
 * Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be
 * pushable on contact, like boats or minecarts.
 */
public AxisAlignedBB getCollisionBox(Entity entityIn)
{
    // Replaced this
    //return entityIn.getEntityBoundingBox();
    return entityIn.canBePushed() ? entityIn.getEntityBoundingBox() : null;
}
SunCat

Still in 16w15b

AgentM

Erik Broes

Community Consensus

Boat, Collision, Entity

Minecraft 16w04a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, ..., Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 16w15b, Minecraft 1.10.2

Minecraft 16w38a

Retrieved