Players with increased step height can fall by 1 block or more even when they are sneaking.
Reproduction steps:
Increase player step height, for example with the following command:
/attribute @s minecraft:generic.step_height base set 10
Try to sneak while moving on top of a block.
Notice that you can fall by 1 block or more. The larger the step height, the more it is possible to fall.
This is likely due to the use of this.maxUpStep()
inside of Player#maybeBackOffFromEdge
and Player#isAboveGround
, which causes the checks to scale with the step height.
Linked issues
Attachments
Comments 7
Currently, the player does not sneak walk off, but rather falls off the edge of the block.
Either way, I think that this should not be the expected behavior because achieving a step height increase then feels like a downgrade in some aspects (because you have to unlearn the muscle memory of sneak preventing you from falling off full blocks). If the player really wants to fall of the block, they can already do so by releasing their shift key.
@Misode No. From years of this attribute existing in forge, the expected behavior from players is that the step-down height is static (always 0.5). The attribute (step height / maxUpStep) should only control how far up you can go, without causing you to lose the ability to hug a block via sneaking.
See https://github.com/SlimeKnights/TinkersConstruct/issues/4956 (first instance of a player-sourced issue report against this issue) and https://github.com/MinecraftForge/MinecraftForge/pull/8927 (the fix implemented to forge, noting that forge's attribute does not change the value of maxUpStep() )
Thank you for your report!
After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – The official Minecraft feedback site
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
This shouldn't be considered resolved.
Did you try actually playing with this? It feels really weird. The player can even take fall damage if the step height is large enough, potentially dying.
Guess if this is being closed as WAI then we should go open another issue against the "stepping down is actually a fall and not a step down"
This also affects the case where the player is attempting to sneak on the edge of a lava lake, possibly to hit a mob or interact with a block on the other side of it. Depending on how deep the lava they’re sneaking over is, the player may fall into it, and since they have no way of knowing for sure whether that will happen, they may be compelled to build a bridge or take an alternate path even when it was not necessary. This risk of death and modification of gameplay habits is very undesirable, since a higher step height is widely though of as a strict mobility buff.
The solution is to hardcode the “maximum step off when sneaking” height to 0.6. A gamerule, or even a client setting, to restore the current behavior could be interesting, but in practice I suspect hardly anyone would prefer to use it.
(The command for those boots is below. It requires a command block due to its length.)
/give @p diamond_boots[minecraft:custom_name="Diamond Boots of Superior Walking",minecraft:attribute_modifiers=[{type:"minecraft:armor",slot:"feet",id:"vanilla_armor",amount:3d,operation:"add_value"},{type:"minecraft:armor_toughness",slot:"feet",id:"vanilla_toughness",amount:2d,operation:"add_value"},{type:"minecraft:step_height",slot:"feet",id:"boots_modifier",amount:0.5d,operation:"add_value"}]]
Is this not intended? What else would control the height difference check when sneaking at the edge of a block? If the player is able to step up a certain height I would also expect them to sneak walk off that same height.