mojira.dev
MC-96198

Boats / rafts move into blocks when landing in less than one block deep water

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

  1. Grab a boat

  2. Create setup shown in screenshot

  3. 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

MC-96382 Boat sinking into ground from water_bucket flow Resolved MC-104599 Boats Fall Through The Floor Resolved MC-128546 boat glitch when going too fast Resolved MC-151870 Boats can clip through blocks when falling into flowing-water Resolved MC-177486 boats glitch in the ground when falling into flowing water Resolved

Attachments

Comments 22

cannot confirm

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

12 more comments

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

AgentM

(Unassigned)

Confirmed

Platform

Important

Collision

Minecraft 16w04a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, ..., 22w45a, 1.19.3, 1.20, 1.20.1, 23w44a

24w19a

Retrieved