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 @unknown can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.client.player.LocalPlayer.java
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.
Related issues
is duplicated by
relates to
Attachments
Comments


Able to reproduce. OS is Windows 10 Home.
Video

Affects 1.14.2-pre4

Can confirm in 1.14.2-pre4 using Linux

Still in 1.14.2 (Release). Also, please add "FOV" be added to the title/description to make it easier to find this bug report.
The fov has nothing to do with the sprinting, it's just its symptom. The title is perfectly fine as "you sprint, you start sneaking, but don't actually stop sprinting"

You can reproduce this by preparing to throw a trident and preparing to charge a bow/crossbow.

Not sure what your point is KennyTV. I didn't say the title is inaccurate or anything. I simply asked for "FOV" to be added somewhere in the bug report so that it's easier to find.
Reason being is that this bug also affects the FOV (which is a symptom of sprinting, yes), and the FOV not changing correctly was first and only thing I noticed about this bug for a little while, leading me to create a duplicate bug report as I didn't find this one. I realized later that there was more to it than that. Had "FOV" been anywhere in the bug report I would have found it immediately and not wasted people's time. I don't see the harm in it being added.
Anyway, FOV has since been added to the labels, which is all I was really looking for.
Confirmed. I added some extra information to the report that came from the comments to help this ticket become easier to search for.

Still in 1.14.3 pre2

Can confirm for 19w35a
This is now an even bigger problem as of 19w41a, as you can toggle sprinting and sneaking allowing you to sneak sprint just by pressing 2 buttons. Normal sneaking will become completely useless.

Happens in 19w42a

Also, I think that If you move diagonally (holding both w and a or d) you can move even faster

Still an issue in 1.15 Pre-Release 6

And 1.15 Pre-Release 7, but you might as well wait until 1.15 is released to update the ticket at this point... :/
Still affects 1.15

1.15.1. Fixing Craft but not fixed..
What?

Prior to 1.15, sprint inputs can now be switched between hold and toggle mode in the Accessibility options.

Affects 1.15.2 pre-release 2.

Affects 20w06a

Affects 20w07a

Is this a feature? Still in 20w09a

No, it's a bug

30 versions of Minecraft released with this bug and still not fixed. (20 here in "versions:"). Is this so hard to repair??

I kind of prefer this bug to be kept.
Makes cheaters in PvP servers have 1 less advantage.

20w13a, 20w13b

I'd say it's a bug that's becoming a feature, like 0-ticking was, I don't really care if it gets removed or not, and that's why it hasn't been removed, it's a bug nobody cares much about.

Confirmed for 1.16 pre-release 2

Affects for 1.16 Pre-release 5

In one snapshot it was made that you no longer produce particles when walking. You used to also produce sprinting particles, like normal sprinting.
Edit: When blocking with a shield while sprinting you still produce particles, but not when sprinting and sneaking at the same time.

Can confirm for 1.16 pre release 7

Confirmed in 1.16 Pre-release 8.

Affects 1.16-rc1

In 1.16.2-pre1

1.16.3-rc1

The ownership of the ticket was given to @unknown due to original reporter being inactive

20w48a
Can confirm in 21w03a. Willing to take ownership as the report has been marked as inactive.
Can confirm in 21w08b.

Relates to MC-99848

21w18a

21w20a
Using swift sneak, this allows you to sneak very quickly while jumping.

Also another thing to point out unless I'm mistaken. If you begin to sprint, then sneak, and then jump, you're then faster than walking speed, notably at swift sneak 3.

Can confirm that this bug is still present as of version release 1.19.1

this bug has been in minecraft for way too long time, and i think they made ti a feature since i use it too and know how does it work. the only thing that stops the player from sprinting when doing the listed things is when you accidentaly push into a block then you cant retreive the sprint back while doing the listed things above
I've removed the "riding entities" part from this ticket and reported this issue separately at MC-267343 since I believe this is a different problem.

Could this "bug" be kindly unfixed? Sprint Sneaking is one of the best mechanics in the game and makes raiding Ancient Cities actually fun. Slowly sneaking around isn't fun, but stealthily dashing about with the Sprint Sneak while dodging sensors is a lot of fun. I literally get Swift Sneak specifically for use with Sprint Sneaking.
Also who honestly wants to reinput the sprint button every time they eat, I'm calling it now, people who never knew this was a "bug" are going to complain when they find out that eating now cancels their sprint.
My take is, if fixing a "bug" makes the game feel more sluggish and less fun, that is not a "bug" that you want to fix.
Please leave feedback on the Minecraft feedback website instead of here on the bug tracker. This ticket was considered a valid issue, so it's unlikely that the fix will be reverted. After all, you cannot begin sprinting while using an item so it makes sense for sprinting to be canceled upon performing the said interactions.

Reported the loss of sprint input buffer (a side-effect of this bug) as its own bug over at MC-278005.

For those interested here's a feedback post if you wish to discuss this. As the bug tracker is not the right place.
(If you can't log in look at pinned comment in WEB-6665 )

Bug fix has been reverted. See 25w04a's announcement article.

Bug hasn't reverted consistently. Flying with elytra not work as intended. It works like in versions with fixed bug
Wrote bug report about this problem https://bugs.mojang.com/browse/MC-279725

@Riflusso That is actually tracked under MC-279688

this bug isn't in 1.21.4 but it is in 25w04a