[MC-11608] Sprinting is cancelled when attacking a mob Created: 12/Mar/13  Updated: 18/Apr/23  Resolved: 29/Apr/22

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.7, Minecraft 14w06b, 1.17, 1.17.1, 21w41a, 1.18.1, 22w03a
Fix Version/s: None

Type: Bug
Reporter: Connor Steppie Assignee: Unassigned
Resolution: Works As Intended Votes: 9
Labels: None

Issue Links:
Duplicate
is duplicated by MC-12754 Sprint stopping while hitting someone... Resolved
is duplicated by MC-17281 Glitches Somewhat Break PvP Resolved
is duplicated by MC-32858 Mob Hitting Resolved
is duplicated by MC-48049 if you sprint and then hit a mob you ... Resolved
is duplicated by MC-56229 Sprint scoreboards won't increase aft... Resolved
is duplicated by MC-75732 Sprinting stops when breaking a boat/... Resolved
is duplicated by MC-99834 stat.sprintOneCm stops counting after... Resolved
is duplicated by MC-120145 Sprint momentarily glitches when hitt... Resolved
is duplicated by MC-126028 MC Sprinting Stops When hitting an En... Resolved
is duplicated by MC-210106 Sprinting gets disabled if you hit an... Resolved
is duplicated by MC-253805 Toggle Sprint Glitch Resolved
Relates
relates to MC-69459 Client-server desync when player atta... Reopened
relates to MC-183184 Sprinting stops as soon as you touch ... Resolved
CHK:
Confirmation Status: Confirmed
Category:
Game Events, Player

 Description   

The Bug

Normally If you run and hit Player or mob,your sprint will be stopped when he get damage,So it supposed to be because he got damage.
But your sprint will still be disabled if you hit player with gamemode 1 while sprinting.

Attacking entities with a knockback attack disables your sprint.

Please note that in order to perform a knockback attack, you must sprint and attack an entity with a fully charged hit, (no attack/damage cooldown should be occurring when you do this). Please also note that if you were to hold down your sprint key whilst reproducing this, your sprint will stop momentarily before returning to normal after performing a knockback attack.

Steps to Reproduce

  • Summon an entity and stand a fair distance away from it.
  • /summon minecraft:creeper ~ ~ ~ {NoAI:1b}
  • Begin sprinting towards it, attack the entity with a knockback attack, and pay close attention to your sprint as you do this.
  • Take note as to whether or not attacking entities with a knockback attack disables your sprint.

Observed Behavior

Attacking entities with a knockback attack disables your sprint.

Expected Behavior

Attacking entities with a knockback attack would not disable your sprint.



 Comments   
Comment by [Mod] Avoma [ 16/Dec/21 ]

Can confirm in 1.18.1.

Comment by [Mod] Avoma [ 21/Oct/21 ]

This also affects 1.17.1 and 21w41a.

Comment by [Mod] Avoma [ 21/Oct/21 ]

Judging by the "is duplicated by" issue links, I'm pretty the issue here is that your sprint is canceled when attacking a mob with a knockback attack. Also, I think what the reporter is trying to imply when they say "But your sprint will still be disabled if you hit player with gamemode 1 while sprinting.", is that the issue can be reproduced with invulnerable entities as well. (Creative players are invulnerable).

Since a more clearer description is needed, I've rewritten this ticket to correctly reflect exactly what the problem is, what the expected behavior should be, and how you can go about reproducing it.

The Bug:

Attacking entities with a knockback attack disables your sprint.

Please note that in order to perform a knockback attack, you must sprint and attack an entity with a fully charged hit, (no attack/damage cooldown should be occurring when you do this). Please also note that if you were to hold down your sprint key whilst reproducing this, your sprint will stop momentarily before returning to normal after performing a knockback attack.

Steps to Reproduce:

  • Summon an entity and stand a fair distance away from it.
  • /summon minecraft:creeper ~ ~ ~ {NoAI:1b}
  • Begin sprinting towards it, attack the entity with a knockback attack, and pay close attention to your sprint as you do this.
  • Take note as to whether or not attacking entities with a knockback attack disables your sprint.

Observed Behavior:

Attacking entities with a knockback attack disables your sprint.

Expected Behavior:

Attacking entities with a knockback attack would not disable your sprint.

Comment by [Mojang] Moesh [ 21/Oct/21 ]

This description is unclear. Is the bug about hitting mobs while sprinting, or what happens when you hit a player in creative mode, while sprinting?

Comment by Connor Steppie [ 08/Jun/21 ]

Can still reproduce in 1.17. The fact that it's "not an issue with the sprint button" is due to said button restarting the sprinting, rather than preventing its cancellation, and should never have been grounds for resolving this. Please reopen.

Comment by Tails [ 27/Mar/14 ]

No longer an issue with the sprint button.

Comment by Kumasasa [ 09/Feb/14 ]

Reopened.

Comment by Talven81 [ 26/Nov/13 ]

No response in 4 months, assuming no longer an issue.

Comment by Kumasasa [ 27/Jul/13 ]

Is this still a concern in the current Minecraft version 1.6.2 / Launcher version 1.1.2 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Comment by Amit Shalev [ 12/Mar/13 ]

Its not stopping me from moving, only disable my sprinting..

Comment by Anon Ymus [ 12/Mar/13 ]

Duplicate of MC-3386?

Generated at Sun Jan 12 12:28:12 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.