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

Boats can float in water due to incorrect calculation of water height

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.12.2, Minecraft 18w05a, Minecraft 1.13.1
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      Based on 3 Glitches with Boats- 1.12 Vanilla Survival

      Boats can float under water beneath non full level block water columns.

      How to reproduce

      1. Build a setup as shown in Setup.png
        /fill ~1 ~ ~1 ~17 ~ ~17 sandstone
        /setblock ~9 ~1 ~9 flowing_water
        
      2. Remove the sandstone
        /fill ~1 ~ ~1 ~17 ~ ~17 air
        
      3. Place a boat under water
        It floats

      Code analysis

      Based on 1.12.2 decompiled using MCP 9.40

      It appears the method net.minecraft.block.BlockLiquid.getBlockLiquidHeight(IBlockState, IBlockAccess, BlockPos) does not return the correct height in the affected situation.
      It is not clear whether this method should act differently or if the affected water blocks should not be there in this situation.

      There might be other causes as well.

        Attachments

        1. Float.png
          Float.png
          946 kB
        2. Setup.png
          Setup.png
          845 kB

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                6 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: