mojira.dev
MC-248861

Eating doesn't reduce vertical swimming speed

The bug

When sprint-swimming and jumping at the same time while aiming directly upwards, the speed of ascension is about 6.98 blocks per second. When eating, pulling back bow, blocking with shield or doing similar things, the speed of walking, sprinting or swimming is supposed to be reduced. However, this vertical swimming speed is not slowed down by eating at all.

How to reproduce

  • Run the following commands.

    /execute at @p align xyz run tp @p ~0.5 ~ ~0.5 0 -90
    /execute at @p run fill ~-1 ~-1 ~-1 ~1 ~100 ~1 glass
    /execute at @p run fill ~ ~ ~ ~ ~100 ~ water
    /item replace entity @p weapon with apple
    /gamemode survival @p
    /gamemode creative @p
  • Turn on the debug screen by hitting F3.

  • Press sprint (default left Ctrl), forward (default W) and jump (default Space) at the same time. Notice from the y-level on the debug screen that the player is swimming upward at the speed of roughly 7 blocks per second.

  • Press use (default right mouse button). the player now starts continuously eating the apple.

  • Notice that the player's rate of ascension has not changed, even though they are eating constantly.

Related issues

Attachments

Comments

migrated
[media]
migrated

Does MC-12305 describe the issue?

windwend

Hi Jess, yes, MC-12305 does describe this issue. You can mark it as duplicate if you want, but I recommend that you independently reproduce it before doing that. The code I provided should make the process pretty standardized. (You can run the code on a chain of command blocks as well.)

windwend

(Unassigned)

Unconfirmed

(Unassigned)

1.18.2

Retrieved