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

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • Minecraft 1.12.2, Minecraft 18w05a, Minecraft 1.13.1
    • Confirmed
    • (Unassigned)

      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.

        1. Setup.png
          845 kB
          Marcono1234
        2. Float.png
          946 kB
          Aaron Rhodes

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: