mojira.dev
MC-146855

Can't jump onto 1.5 block tall gaps

The bug

Whenever a player attempts to jump/fly onto a 1.5 block gap (1 full block and a slab of air) the player won't be allowed to pass through/rest on the ledge.

Linked issues

Attachments

Comments 10

Note: You have to be sneaking to reproduce this bug (just for those people who don't know all the 1.14 features)

It is not fixed I experienced this also in 1.15.2.

Still affects snapshot 20w18a.

Pretty sure that's because the player's head goes above the gap so you can't move forward (the player jumps 1.25 blocks without any outside interference)

Confirmed for 21w07a. If you have a ceilling above you that is at the hight of the ceilling of the 1.5 blocks tall gap, than you are able to jump onto it.

[media]

Can confirm in 1.16.5 and 21w08b.

Can confirm in 1.19.2.

Relates to MC-120779 (Actually the same cause, and both of them are hard to fix)

The exact height per game tick when jumping on flat ground is:

0.4199999868869781

0.7531999805212017

1.0013359791121474

1.1661092609382140

1.2491870787446813

1.2522033402537238

1.1767592750642373

1.0244240882136801

0.7967356006686920

0.4952008770059118

0.1212968405391897

0

This is because player's generic.jump_strength is 0.42, and generic.gravity is 0.08.

The height and y velocity of the 1st tick of jump is equal to jump_strength, is 0.42(rounded down to 0.4199999868869781 due to the floating point error), and every tick after that before touching ground is calculated by the formula below (where drag=0.98):

velocity(n)=(velocity(n-1)-gravity)*drag
height(n)=height(n-1)+velocity(n)

This formula is not very accurate due to floating point errors, but it could get a height very close to the actual height.

And, you can only jump into a ceiling when the height of one tick is above the ground of it and (the height of that tick)+(Player's hitbox height) is lower than the ceiling height.

For example, if you want to jump into a 1.5 blocks ceiling from 1 block lower when sneaking:

(In Java Edition hitbox height is 1.5 blocks, In Bedrock Edition is 1.49 blocks)

0.7531999805212017<1

1.0013359791121474>1, 1.0013359791121474+1.5=2.5013359791121474>2.5

1.0244240882136801>1, 1.0244240882136801+1.5=2.5244240882136801>2.5

0.7967356006686920<1

So it's impossible in Java Edition.

In Bedrock Edition,

1.0013359791121474+1.49=2.4913359791121474<2.5

So it's possible.

But if you want to jump into it from 0.8125 blocks below, it will be certainly impossible.

{*}{*}This is also the principle of MC-120779.

These are my full analysis, but, actually, I don't think it is a bug.

Sen Flin

(Unassigned)

Confirmed

Hitboxes, Player

jumping, sneaking

Minecraft 19w12b, Minecraft 19w13a, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, ..., 21w07a, 21w08b, 1.19.2, 1.21.5, 1.21.7 Release Candidate 2

Retrieved