Mojira Archive
MC-124819

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

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.

Cannot Reproduce

Marcono1234

2018-02-05, 04:51 PM

2020-02-15, 04:50 PM

2020-02-15, 04:49 PM

6

4

Confirmed

(Unassigned)

boats, water

Minecraft 1.12.2, Minecraft 18w05a, Minecraft 1.13.1

-