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 MC-104599 Boats Fall Through The Floor MC-128546 boat glitch when going too fast MC-151870 Boats can clip through blocks when falling into flowing-water MC-177486 boats glitch in the ground when falling into flowing water MC-197353 Boat slid into ground after dismounting MC-201953 Boats can fall through blocks when pushed into flowing water MC-214961 Boat falls through the floor on certain turns MC-215403 The player sunk into the ground while boating in a cave MC-222097 sinking boat MC-226801 Sometimes riding a boat in flowing water causes you to get stuck in blocks for a moment MC-229766 Boat sinks through blocks MC-230069 Boat getting stuck MC-234154 Boat able to phase through blocks MC-244101 Boat when placed on water went into the ground MC-246979 cats in boat in flowing water descend into block below and suffocate MC-249024 Boat disappears when on water above soul sand MC-251769 Boat Sinks in falling flowing water MC-252322 Boats clip through blocks MC-252746 Sinking through block when on a boat MC-253700 the boat gets stuck in blocks MC-253981 Glitch with boat and flowing water MC-254233 Oak Boat with Chest sinks under the water while you are on fire. MC-256565 Bamboo Raft Clipping through blocks under flowing water stream MC-256676 New bug in 1.19.3 snapshot MC-257274 Boats move through solid floor if falling onto shallow water MC-257568 Boat adios in 13 cm deep water (falls through blocks) MC-258764 Boats become unable to move and will sink into the ground if you drive it from plane of water. It will not sink into the ground untill you leave the boat. MC-263380 The boat sinks when it encounters downward flowing water and cannot be ridden MC-263572 boat glitch in ground MC-264435 Boats go thru floor MC-266381 The ship got stuck in the soil

Attachments

Comments

user-f2760

cannot confirm

AgentM

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)

user-f2760

I was and I was, it just didn't happen to me

Trevor

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.

Zelda73021

Was able to reproduce in this video: https://www.youtube.com/watch?v=4FNCWE3xgL4

bob

Can confirm for 1.11

carpet0928

This issue relates to MC-136358 and MC-127322.

carpet0928

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.

carpet0928

Surprisingly, I can reproduce now! Confirmed for 1.14.

j_p_smith

Confirmed in 1.16.1.

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 21w05b.

Nassim Jahnke

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.

Avoma

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.

Qcom

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]
Matt Taylor

Can confirm the bug is still in 1.19 prerelease3

esoij

Can confirm in 1.19-rc2

Avoma

Can confirm in 22w42a. This now also affects bamboo rafts.

Avoma

Can confirm in 1.19.2.

Lunarian

Can confirm in 1.20.1 per MC-263572.

Ellivers

Can confirm in 1.20.4.

Tommy

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