mojira.dev
MC-156496

Levitating while crouching gets you stuck in crouching when on the ceiling

The bug

If I have the levitation effect, get stuck on a ceiling and press shift, I get stuck in sneaking position (and move slow as a result). As I understand it, if I press shift while I have Levitation, the player becomes 1.5 blocks tall instead of 1.8, it moves higher up and when I let shift it has no space above its head to return to normal position and 1.8 height.

How to reproduce

Creative mode
  1. Stand below a block

  2. Give yourself levitation

  3. When you get stuck at said block, press shift and let it.

You will see that you remain in crouching position.

Survival mode

The same, in order to get levitation go to an end city and get hit by a shulker.

Linked issues

Attachments

Comments 15

I can confirm for 1.16.2

I don't see the issue - That's how it behaves in every other scenario, why should it be different here?

@LateLeg Mainly because it can get really annoying. It's easy to hit Shift by accident and it is then irreversible until you stop levitating.

Can confirm that this is an issue in 20w51a, although it seems intentional to prevent the player glitching through blocks. I've attached a video and here are some steps to reproduce. 

[media]

Steps to Reproduce:

  • Stand in a two block tall space and run the following command:

/effect give @p minecraft:levitation 10 1
  • Whilst the levitation effect is active, shift.
    → ❌  Notice how you stay in the shifting position until the effect expires.

Also in 1.16.4, just saying.
This is also "undone" if you move to a different x/z position, where there's space to stand up again before hitting a block, such as the ceiling being 1 block higher.
Aside from just being positioned as if you're sneaking, you're also slowed down, which becomes very fatal against shulkers. Logically, the player would be able to push themselves away from the ceining to stand up again, if there's room to stand up.

5 more comments

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.2.

Affects 23w40a, likely relates to MC-148097 and MC-193931.

A fix for this would be to check if there is sufficient space below the player while under the effect and not currently using the sneak key. If so, the player is automatically moved downwards by just enough distance as to return to the full standing state,

Most if not all Source-engine games move the player's feet up, rather than head down, when crouching in the air. This minor change would resolve this issue and make crouching mid-jump feel more natural.

Xenofon Soulis

(Unassigned)

Confirmed

Collision, Player

Minecraft 1.14.3, 1.14.4, 1.16.2, 1.16.4, 20w51a, ..., 1.18.1, 1.18.2, 1.19, 1.19.2, 1.20.1

Retrieved