The bug
When a boat is falling while over a slime block, once it gets to about 5 blocks on top of the slime block, the boat will start rising and falling very slowly. As of 22w12a, this also occurs with boats with chests. As of 1.21.2 Pre-Release 2, the effect is not as large and does not occur with every bounce, but still happens.
How to reproduce
Video demonstrating the issue: https://gfycat.com/PrestigiousDistantGardensnake
Code analysis
Code analysis by @unknown can be found in this comment.
Related issues
is duplicated by
Attachments
Comments


Confirmed for 1.12
Actually the boat movements seems to get softened, and that makes it visually bounce on the air when it hits the slime block server-side and it goes up again before it hits the ground client-side.
MC-111271 describes it better, and the gif in this issue is still relevant for 1.12.
EDIT: on a side note, slime blocks pushed by pistons sometimes fail to launch a boat in the air and only push it a few blocks. Is that a different issue?

Confirmed for 1.12-pre6

Video documenting the bug: https://www.youtube.com/watch?v=KJsT9R3tckE

A possible cause could be an interference with how the game extrapolates positions of a moving object and with collision detection. A similar behavior is seen in MC-110648 (possibly the same cause, different issue though). This issue is also in 18w08b.

Confirmed for 1.13.1.

Confirmed for 1.13.2-pre2.

Confirmed for 19w34a.
@unknown, 1.15 is already added in the Affected Versions.

Confirmed for 20w18a.

Confirmed for 20w45a, but also the boat now breaks after a couple of bounces.
[media]
What does this look like with hitboxes enabled f3+b?

Marty McFly, the hitbox of the boat follows the boat. If the question is about it breaking, it still happens when in the center of a 3x3; making it not specific to being over the block. And it also breaks with mobs in it.

I was thinking it could be a rending issue. Minecarts have tons of similar issues MC-158169 where the hitbox is in the correct place, but not the entity. Based on your reply this does not seem to be the case.

Relates to MC-119369
Can confirm in 20w48a.
Can confirm in 21w03a.
Can confirm in 1.18 Pre-release 1.
[media][media]
Code Analysis (Yarn - 1.18.1)
The issue here is that the client does not run the same calculations as the server.
BoatEntity.java
public void tick() {
//...
if (this.isLogicalSideForUpdatingMovement()) {
if (!(this.getFirstPassenger() instanceof PlayerEntity)) {
this.setPaddleMovings(false, false);
}
this.updateVelocity();
if (this.world.isClient) {
this.updatePaddles();
this.world.sendPacket(new BoatPaddleStateC2SPacket());
}
this.move(MovementType.SELF, this.getVelocity());
} else {
this.setVelocity(Vec3d.ZERO);
}
//...
}
isLogicalSideForUpdatingMovement()
returns true
if the client is running the code and the client player is controlling the boat, or if the server is running the code.
Basically, when you are not controlling the boat, the client will run this.setVelocity(Vec3d.ZERO);
instead of running the actual physics.
Resulting in de-sync of the client & server.
Proposed Fix:
public void tick() {
//...
if (!(this.getFirstPassenger() instanceof PlayerEntity)) {
this.setPaddleMovings(false, false);
}
this.updateVelocity();
if (this.world.isClient && this.isLogicalSideForUpdatingMovement()) {
this.updatePaddles();
this.world.sendPacket(new BoatPaddleStateC2SPacket());
}
this.move(MovementType.SELF, this.getVelocity());
//...
}
This has been tested and works perfectly. It will simply allow the client to run the physics while still limiting the updating & packets for when it's being controlled.

Wouldn't it be
if (this.world.isClient && this.isLogicalSideForUpdatingMovement())
Can confirm in 1.18.2 and 22w16b.
Can confirm in 1.19.2.