The bug
A boat will glitch / sink through blocks when it falls onto shallow water (see screenshot for setup to reproduce glitch or 3 Glitches with Boats- 1.12 Vanilla Survival)
How to reproduce
Grab a boat
Create setup shown in screenshot
Speed up using 'W' and move towards the waterfall. once you fall on the floor below, you will sink/glitch through the ground, as shown in the video here: https://www.youtube.com/watch?v=Q8mtxsNCOAE
Code analysis
Based on 1.12.2 decompiled using MCP 9.40
It appears the call to Entity.setPosition(double, double, double)
in the method net.minecraft.entity.item.EntityBoat.updateMotion()
is causing this:
if (this.previousStatus == EntityBoat.Status.IN_AIR && this.status != EntityBoat.Status.IN_AIR && this.status != EntityBoat.Status.ON_LAND)
{
this.waterLevel = this.getEntityBoundingBox().minY + (double)this.height;
// The following line appears to be causing the bug
this.setPosition(this.posX, (double)(this.getWaterLevelAbove() - this.height) + 0.101D, this.posZ);
this.motionY = 0.0D;
this.lastYd = 0.0D;
this.status = EntityBoat.Status.IN_WATER;
}
It is unknown if leaving this out solves this bug without causing any other problems.
Linked issues
is duplicated by
Attachments
Comments

Tell me what the issue was for reproducing it @FVbico
Were you in the latest snapshot.
Try going at full speed and use F5 mode for optimal setup. (Reference the video if needed)
I was and I was, it just didn't happen to me
I was able to reproduce it. (16w04a)
1. Launch the boat off the upper level of water.
2. Keep holding “W” until landing in the lower flowing water.
Was able to reproduce in this video: https://www.youtube.com/watch?v=4FNCWE3xgL4
Can confirm for 1.11
I don't seem to be able to reproduce in 1.13.1; instead of sinking through the floor, the boat glitches above the water flow repeatedly.
Surprisingly, I can reproduce now! Confirmed for 1.14.

Confirmed in 1.16.1.
Can confirm in 20w48a.
Can confirm in 21w05b.
Still an issue in 1.17.1. As already stated, the issue stems from the following call in Boat#floatBoat
this.setPos(this.getX(), (double) (this.getWaterLevelAbove() - this.getBbHeight()) + 0.101D, this.getZ());
where you get the following values if placing a boat at feet height y=64 for example
getWaterLevelAbove() = 64.44444
getBbHeight() = 0.5625
(double) (this.getWaterLevelAbove() - this.getBbHeight()) + 0.101D = 63.98294274902344
This video shows where this can also be abused to clip through a bedrock layer, player bases and similar.
Can confirm in 1.18.1. It's important to note that this can be reproduced without boats needing to fall from high places into water.

This can also be reproduced by placing a boat in the corner of a minimum height flowing water block between heights 8 to 63.
[media]Can confirm the bug is still in 1.19 prerelease3
Can confirm in 1.19-rc2
Can confirm in 22w42a. This now also affects bamboo rafts.
Can confirm in 1.19.2.

Can confirm in 1.20.1 per MC-263572.

Can confirm in 1.20.4.
can't believe this bug is 8 years old
cannot confirm