mojira.dev
MC-11608

Sprinting is cancelled when attacking a mob

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.

Linked issues

Comments 11

Duplicate of MC-3386?

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

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.

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

Reopened.

1 more comments

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.

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?

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.

This also affects 1.17.1 and 21w41a. 🙂

Can confirm in 1.18.1.

Amit Shalev

muzikbike

(Unassigned)

Confirmed

Game Events, Player

Minecraft 1.4.7, Minecraft 14w06b, 1.17, 1.17.1, 21w41a, 1.18.1, 22w03a

Retrieved