The bug
When sitting in boats and boats with chest mobs legs penetrate the hull.
Does not affect the bamboo raft or bamboo raft with chest.
Reproduce steps
Use the following command:
/summon boat ~ ~1 ~ {NoGravity:1b,Passengers:[{id:zombie_villager}]}
After the version 1.9-pre4:
Wither skeleton
Guardian
Elder guardian
Zombie villager
Husk
Cave spider
Spider
Evoker
Illusioner
Salmon
Phantom
Drowned
Dolphin
Pillager
Axolotl
Camel(when sitting)
Sniffer
Cat(tail)
Fox(tail)
Ghast
Glow squid
Ocelot(tail)
Ravager
Squid
Turtle
CreeperFixed in 23w31aSlimeFixed in 23w31aMagma cubeFixed in 23w31aSkeletonFixed in 23w31aZombieFixed in 23w31aEndermanFixed in 23w31aVillagerFixed in 23w31aWitchFixed in 23w31aPolar bearFixed in 23w31aVindicatorFixed in 23w31aCodFixed in 23w31aPufferfishFixed in 23w31aTropical fishFixed in 23w31aPandaFixed in 23w31aWandering traderFixed in 23w31aPiglinFixed in 23w31aPiglin bruteFixed in 23w31aIron golemFixed in 23w31aSnow golemFixed in 23w31aWardenFixed in 23w31aBatFixed in 23w31aMule(tail)Fixed in 23w31aStrayFixed in 23w31aTadpoleFixed in 23w31aZoglinFixed in 23w31aZombie horse(tail)Fixed in 23w31aZombified piglinFixed in 23w31aShulkerFixedAllayFixed
Code Analysis / Potential Fix
Code analysis and fix by @unknown can be found in this comment.
Linked issues
is duplicated by
relates to
Attachments
Comments

also affects the player when a passenger is in the boat

Personally I do not think this is worth fixing.
Nearly every mob has different leg length or no legs at all. Implementing for every single mob a special case is in my opinion not worth it and not even possible.
For Endermen it looks already strange because they are kind of floating...
Creeper is still not fixed.
Players can attack Creeper from boat bottom.

Damaging is hitbox based and very likely MC-80877

Affects 16w07b.

Affects 1.9.4.

Fixed for players. Affects 18w20c

Possibly clones MC-6241

Affects 18w22b

Affects 18w22c

Affects 1.13-pre1

Affects 1.13-pre2.
Since villagers are completely anthropomorphic, shouldn't the fact that they don't adopt a sitting position like other mobs do be considered a bug in its own right?

Affects 1.13-pre3

Affects 1.13-pre4

Affects 1.13-pre5

Affects 1.13-pre6

Affects 1.13-pre7

Affects 18w30b

Please link this in the description of the report.
The following is based on a decompiled version of Minecraft 1.12 using MCP 940
The reasons for this is caused in the method net.minecraft.entity.item.EntityBoat.updatePassenger
where the setposition for passengers is set, at first the posY float looks to not cause it.
float f1 = (float)((this.isDead ? 0.009999999776482582D : this.getMountedYOffset()) + passenger.getYOffset());
But once you go to the method getMountedYOffset()
you can see why this happens,
public double getMountedYOffset()
{
return -0.1D;
}
what this does is return the value '-0.1D' which will set the entity 0.1 down therefore the entity goes through the boat.
Potential fix
Change the value to '0.0D' so it will return the value 0, which basicially means it will not change it's posY.
public double getMountedYOffset()
{
return 0.0D;
}
I'll attach two screenshots with the potential fix.
Hope this helps and explains this issue 🙂

Still in 1.14 pre-3, 1.14 pre-4 and 1.14 pre-5

Still in 1.14 Release

Still in 1.14.1 Release

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2
Can confirm in 21w05b.
Can confirm in 21w07a.
Relates to MC-150016.
Can confirm in 21w13a.
Can confirm in 21w15a.
Can confirm in 21w17a.
Can confirm in 1.17.

Can confirm in 21w42a.

Can confirm in 1.18.1 (I only checked villagers and players with and without armour, but I'm sure it works with the other mobs too).
Can confirm in 1.18.2.

@unknown Please stop confirming tickets for outdated versions.

Can confirm in 23w03a.

Can confirm in 23w13a
Confirmed for 16w04a
Still affects Creeper.
Mod please reopened.