Mojira Archive
MC-122116

"minecraft.custom:minecraft.walk_under_water_one_cm" doesn't increase when walking through lava

The Bug:

"minecraft.custom:minecraft.walk_under_water_one_cm" doesn't increase when walking through lava.

The diving statistic only counts diving in water and not lava. This can be an annoyance for adventure maps, and also means that hunger will never decrease while the player is diving in lava. Ideally, a new statistic should be created to track walking through lava.

Steps to Reproduce:

  1. Create a scoreboard objective for tracking when you when walk underwater and set it to display on the sidebar by using the commands provided below.
    /scoreboard objectives add WalkUnderwaterOneCm minecraft.custom:minecraft.walk_under_water_one_cm
    /scoreboard objectives setdisplay sidebar WalkUnderwaterOneCm
  2. Summon a pool of lava by using the command provided below.
    /fill ~1 ~ ~1 ~15 ~4 ~15 minecraft:stone
    /fill ~2 ~1 ~2 ~14 ~4 ~14 minecraft:lava
  3. Switch to creative mode and begin walking around in the lava.
  4. Take note as to whether or not "minecraft.custom:minecraft.walk_under_water_one_cm" doesn't increase when walking through lava.

Observed Behavior:

The scoreboard doesn't increase.

Expected Behavior:

The scoreboard would increase.

Code Analysis:

Code analysis by Oval can be found in this comment.