Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-96198

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w19a
    • Minecraft 16w04a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.10.2, Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12.2, Minecraft 18w05a, Minecraft 1.14, Minecraft 1.14.1, 20w14a, 1.16.1, 20w28a, 1.16.3, 1.16.4, 20w46a, 20w48a, 21w05b, 21w06a, 21w13a, 1.17 Pre-release 1, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19 Pre-release 3, 1.19 Release Candidate 2, 1.19, 1.19.1 Pre-release 5, 1.19.2, 22w42a, 22w45a, 1.19.3, 1.20, 1.20.1, 23w44a
    • None
    • Confirmed
    • Collision
    • Important
    • Platform

      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.

        1. 2016-01-28_17.23.14.png
          2016-01-28_17.23.14.png
          862 kB
        2. 2016-01-29_20.30.04.png
          2016-01-29_20.30.04.png
          229 kB
        3. boat.mp4
          3.57 MB
        4. boatClipHeights.mp4
          4.91 MB

            Unassigned Unassigned
            m124367 AgentM
            Votes:
            29 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: