Sneaking/zh

潜行是一种移动机制，可以减慢玩家的移动速度并让他们避免从方块上掉下来

激活方法
按下潜行键后会立即激活潜行，并在按下时保持激活状态.

潜行与疾跑并不兼容. （1.14+除外）.

效果
当玩家在地面上时，潜行可以防止他们跌落 1 个方块以上.


 * 当潜行到方块边缘时，速度是保持不变的，这对于特定的跳跃非常有用，如 无助跑3+1.
 * 1.11+ 中，下限改为0.6b
 * 当玩家在潜行时落在方块边缘时会出现“shift glitch”，在这种情况下他们可能会掉下来(已在 1.16.2 中修复).
 * 在某些情况下，玩家在地面上潜行时可能会意外地掉下来（范例）-- 在1.16.2中部分修复.

潜行时，玩家可以挂在梯子和藤蔓的一边.


 * They can still climb up as usual, but they can't fall down as long they stay within the block.
 * In general, sneaking makes ladder jumps much easier.

In 1.9+, sneaking lower the player's height down to 1.65m. In 1.14+, sneaking lowers it even more, down to 1.5m.

Speed
Sneaking is 70% slower than walking, granting a base acceleration of 0.03, but it doesn't get applied the same way as walking and sprinting:


 * When sneaking forward, the ground acceleration is 0.03×0.98 = 0.0294, as expected.
 * When sneaking diagonally, the ground acceleration is 0.0294×√2 ≈ 0.0416

Code
It is worth showcasing how sneaking is implemented, and why it's flawed.