"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:
- 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
- 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
- Switch to creative mode and begin walking around in the lava.
- 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.
Linked Issues
Created Issue:
stat.diveOneCm doesn't increment in lava
relates to
The bug
The diving statistic only counts diving in water, not lava. This is annoying for adventure maps, and also means that hunger will never decrease while the player is diving in lava.
Code Analysis by Oval can be found in this comment
stat.diveOneCm doesn't increment in lavaminecraft.custom:minecraft.walk_under_water_one_cm doesn't increment in lava
The bug
The diving statistic only counts diving in water, not lava. This is annoying for adventure maps, and also means that hunger will never decrease while the player is diving in lava.
Code Analysis by Oval can be found in this comment
The bug
The diving statistic only counts diving in water, not lava. This is annoying for adventure maps, and also means that hunger will never decrease while the player is diving in lava.
Code Analysis
Code Analysis by Oval can be found in this comment
The
bug
The diving statistic only counts diving in water, not lava. This is annoying for adventure maps, and also means that hunger will never decrease while the player is diving inlava.Code Analysis
Code Analysis by Oval can be found
inthis commentThe 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:
- 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- 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- Switch to creative mode and begin walking around in the lava.
- 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.
minecraft.custom:minecraft.walk_under_water_one_cm doesn't increment inlava"minecraft.custom:minecraft.walk_under_water_one_cm" doesn't increase when walking through lava
Can confirm for 1.13.1-pre2.
Can confirm for 1.13.1.
Confirmed for 1.13.2-pre2. It the current version, it appears as though the statistic's id is now stat.walk_under_water_one_cm.
The following is based on yarn 1.15.2 pre2 names and MCP 1.12.2 (as for yarn it's just unnamed method).
In the method net.minecraft.entity.player.PlayerEntity.method_7282() (net.minecraft.entity.player.EntityPlayer.addMovementStat() for MCP 1.12.2) the if-statement to add the statistic WALK_UNDER_WATER_ONE_CM it only checks for if the player is submerged in water. To fix this, a check for if the player is submerged in lava should be added with a OR(=||).
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05a.
Can confirm in 21w06a.
Can confirm in 21w07a.