-
Bug
-
Resolution: Fixed
-
Minecraft 1.14.2 Pre-Release 3, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3 Pre-Release 2, 1.14.4, 19w35a, 19w38b, 19w39a, 19w40a, 19w41a, 1.15 Pre-release 1, 1.15 Pre-release 7, 1.15, 1.15.1, 1.15.1 Pre-release 1, 1.15.2 Pre-release 2, 1.15.2, 20w06a, 20w07a, 20w09a, 20w10a, 20w11a, 20w13b, 20w17a, 20w19a, 1.16 Pre-release 5, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16, 1.16.1, 20w27a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2, 1.16.3 Release Candidate 1, 1.16.3, 1.16.4 Pre-release 1, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w08b, 21w10a, 21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Pre-release 5, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Pre-release 3, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w38a, 21w39a, 21w41a, 21w42a, 21w43a, 1.18 Pre-release 1, 1.18, 1.18.1, 22w03a, 22w05a, 22w06a, 22w07a, 1.18.2 Release Candidate 1, 1.18.2, 22w12a, 22w17a, 22w19a, 1.19, 1.19.1, 1.19.2, 22w43a, 1.19.3, 23w07a, 1.19.4, 1.20 Pre-release 1, 1.20, 1.20.1, 1.20.4, 23w51b, 1.20.5 Release Candidate 3, 1.20.5, 1.20.6, 24w19b, 1.21 Release Candidate 1, 1.21, 1.21.3
-
Confirmed
-
Player
-
Important
-
Platform
The Bug:
The player continues sprinting when performing actions that slow them down.
There are certain actions that slow down the player's movement speed. When one of these actions is commenced while the player is sprinting, the player doesn't stop sprinting, and as a result of this, these actions don't slow the player down as much as if they weren't sprinting. The player is unable to start sprinting while one of these actions is active, and as such, this is not intentional.
Actions that slow down the player include:
- Sneaking
- Crawling
- Eating or drinking
- Using a spyglass
- Blocking with a shield
- Charging a bow or crossbow
- Preparing to throw a trident
- Using a goat horn
- Flying with elytra
Steps to Reproduce:
- Obtain a shield, begin blocking with it and walk forwards a couple of blocks.
- Take note of how fast you're traveling.
- Begin sprinting and then start blocking with the shield.
- Take note of how fast you're traveling now compared to the speed at which you were traveling before.
- Take note as to whether or not the player continues sprinting when performing actions that slow them down
Observed Behavior:
The player continues to sprint. Although the player is slowed down, they are not slowed down to the speed they would be traveling if they were not sprinting.
Expected Behavior:
The player would stop sprinting and when using items, they would slow down to the same speed regardless of whether or not they were sprinting.
Code Analysis:
Code analysis by Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
public class LocalPlayer extends AbstractClientPlayer { ... Â public void aiStep() { ... Â Â Â if (this.isUsingItem() && !this.isPassenger()) { this.input.leftImpulse *= 0.2F; this.input.forwardImpulse *= 0.2F; this.sprintTriggerTime = 0; } ...
If we look at the above class, we can see that when a player starts using an item, their movement speed is decreased by a fixed amount. This is evident through the following lines of code:
this.input.leftImpulse *= 0.2F; this.input.forwardImpulse *= 0.2F;
However, this piece of code doesn't check if the player was sprinting when beginning to use an item, thus resulting in players continuing to sprint (and not being completely slowed down) when using items.
- is duplicated by
-
MC-153075 Sneaking when sprinting does not lower the FOV again
- Resolved
-
MC-153150 Sprinting then sneaking is faster than walking then sneaking
- Resolved
-
MC-153256 "sneak sprinting"
- Resolved
-
MC-153765 Sprinting particles while shifting
- Resolved
-
MC-153846 Running, then sneaking still creates particles
- Resolved
-
MC-153866 Players are still able to run when either eating, blocking and using range weapons
- Resolved
-
MC-153971 No Slowdown
- Resolved
-
MC-154102 The effect of running is not removed when you crouch
- Resolved
-
MC-154225 Sprinting particles don't stop when sneaking
- Resolved
-
MC-154755 Sprinting particle while crouching
- Resolved
-
MC-155131 Sprint and shift does not slow. This same with sprint and eat
- Resolved
-
MC-155763 I can still run while i'm right clicking a bow, sneaking, crouching, right clicking a shield, right clicking a crossbow, right clicking a trident
- Resolved
-
MC-156196 Player is able to do unintended actions while doing something else in which it should prohibit said action.
- Resolved
-
MC-156351 Crouching after sprinting keeps sprint FOV and particles enabled
- Resolved
-
MC-156994 Sprint particle bug
- Resolved
-
MC-157677 Sprinting into sneaking particle bug
- Resolved
-
MC-158305 you can sprint while sneaking
- Resolved
-
MC-160588 crouching or crawling after running without stopping shows the block particles
- Resolved
-
MC-164452 Particles shown while sneaking if you hold sprint key and sneak
- Resolved
-
MC-167699 Crouch sprint bug
- Resolved
-
MC-169301 Sprint-Sneaking
- Resolved
-
MC-169681 grafical bug
- Resolved
-
MC-171967 Running particles keep spawning
- Resolved
-
MC-175098 Sprint particles are rendered while sneaking directly from a sprint
- Resolved
-
MC-183369 Sneaking against walls
- Resolved
-
MC-189659 if you press shift and ctrl at the same time it makes you sprint, if you shift, you are faster than a normal crouch, and crouching does not cancel the sprinting, if you uncrouch you will still be sprinting
- Resolved
-
MC-193106 FOV not updating switching from running to crouching
- Resolved
-
MC-202877 Sprint Crouching
- Resolved
-
MC-204956 Sprint particles remain when crawling after sprinting
- Resolved
-
MC-205240 Sneaking while flying and sprinting in creative does not slow the player down
- Resolved
-
MC-209381 Sprinting particles appear when shielding directly from sprint
- Resolved
-
MC-213240 Sprint Shifting
- Resolved
-
MC-215590 dynamic fov doesn't work correctly when crouching
- Resolved
-
MC-227824 Fast while on stairs eating while sprinting
- Resolved
-
MC-232344 Can Sprint Jump/ Head bang while sneaking
- Resolved
-
MC-248989 Using shield, bow, or food while running causes speed issue
- Resolved
-
MC-253919 swift sneak allows going sprint speed while sneaking
- Resolved
-
MC-258903 Running before activating shield increases speed.
- Resolved
-
MC-258976 Crouch statistic does not update if crouch was initiated whilst sprinting
- Resolved
-
MC-259111 Sprinting and shield
- Resolved
-
MC-264185 Sprinting while gliding
- Resolved
-
MC-264458 Sprinting and then sneaking while sprinting keeps the sprinting fov
- Resolved
-
MC-272246 Sprint sneaking
- Resolved
-
MC-278830 Activating Elytra cancels sprinting
- Resolved
-
MCL-10973 Sneaking while runing still shows the runing particles
- Resolved
- relates to
-
MC-193307 crouch_one_cm does not work while jumping/sprinting at the same time
- Open
-
MC-99848 Sprinting isn't canceled upon receiving the blindness effect
- Resolved
-
MC-149704 Sneaking / crouching twice makes player sprint
- Resolved
-
MC-12305 Eating / charging the bow does not slow down movement while climbing vines / ladders / swimming up
- Resolved
-
MC-267343 Sprinting isn't canceled upon riding entities
- Resolved
-
MC-277952 Sprinting isn't canceled upon flying with elytra
- Resolved