mojira.dev

RoccoDev

Assigned

No issues.

Comments

I think we’ve got a misunderstanding here. What I expect to happen is:

* Distance 0.0-3.0 (inclusive): 0 damage
* Distance 3.0 (exclusive) - 4.0 (inclusive): 1 damage
* Distance 4.0 (exclusive) - 5.0 (inclusive): 2 damage
etc.

To me, “falling more than 3 blocks makes you take damage” includes heights like 3.5 which is totally achievable in vanilla even standing still. In other words, it doesn’t make much sense that a “safe fall distance” is set to 3 blocks while it is actually safe from 4 blocks too.

I think the reason why you have those values in 1.21.4 is due to MC-130639, which was fixed in 1.21.5.

My report is just based on the somewhat counterintuitive behavior of safe_fall_distance. After falling for a distance longer than the attribute value, I would expect to take damage. Having it be off by a full block doesn’t make much sense, you might as well require the value to be increased by 1 at that point. If you also consider that the 3.35 value had been in the game for many versions prior, perhaps it might have been worth tweaking the default after changing the formula?

Also, the wiki gets confused on this too:

Most mobs take fall damage after falling more than 3 blocks; however, some mobs are able to fall farther before taking damage. How far a mob can safely fall is controlled by the safe_fall_distance attribute.

but it immediately contradicts itself showing damage is floored in the formula.

Code analysis for the 26.3 client:

It appears that in 1.21.5 the formula in LivingEntity#calculateFallDamage was changed to round the final value down instead of up. Perhaps it was intentional, but as it stands the safe_fall_distance attribute is somewhat misleading.