mojira.dev
MC-310858

Charging with a spear triggers the attack cooldown without dealing damage

In Minecraft Java Edition 26.3-snapshot-7, when charging a spear attack, if a target is within attack range the spear immediately enters its 0.5-second cooldown — even when no damage is actually dealt. Source code inspection shows the cooldown is applied solely upon detecting a valid target in range, regardless of whether the charge speed threshold for damage is met. This causes a severe issue: if a player starts a charge while standing still near a target, the attack fails to deal damage because the speed is too low, yet the cooldown is still triggered. The player is then locked out from dealing damage even after immediately sprinting to gain sufficient speed, because the cooldown is active. Video 1 demonstrates this problem. This fundamentally breaks the spear's charge reliability in common combat situations.

Steps to Reproduce:

  1. Launch Minecraft Java Edition 26.3-snapshot-7.

  2. Obtain a spear.

  3. Stand still next to a target (another player or mob) within the spear's attack range.

  4. While remaining stationary, begin charging the spear (hold right-click). The charge begins, but due to insufficient speed, no damage is dealt.

  5. The spear immediately enters its 0.5-second cooldown the moment the charge begins because the target is within attack range.

  6. Right after the charge starts and the cooldown triggers, immediately begin sprinting toward the target to reach the speed required for damage. Despite now having sufficient speed, the attack will not hit because the cooldown is still in effect.

Expected Behavior:
The spear charge should only trigger the 0.5-second cooldown when it successfully deals damage, or when the charge speed is sufficient to produce a damaging hit. A failed charge attempt (no damage) should not incur the cooldown.

Observed Behavior:
The cooldown triggers immediately upon detecting a target in range at the start of a charge, regardless of damage dealt. This often blocks a valid follow-up charge that would have met all damage conditions.

Cause:
Code analysis reveals that the spear charge handler applies the cooldown as soon as it identifies an entity within attack range, before verifying whether the player's movement speed meets the minimum threshold for damage. This premature cooldown activation prevents legitimate attacks that would otherwise succeed immediately afterwards.

Impact:
Very high — this bug makes the spear's charge mechanic highly inconsistent, particularly when initiating attacks from a standstill near enemies. Even if the player reaches the necessary charge speed the moment the charge begins, the cooldown renders the weapon useless for its duration, undermining core spear gameplay.

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media]

This issue has been reviewed by our team.

Please add new, relevant information if it helps us understand or reproduce the issue. To show that you’re affected, use the vote feature rather than commenting.

If a fix is implemented, it will be listed in our official changelogs.

For major outages or urgent assistance, visit the Minecraft Help Center.

5656565656

(Unassigned)

1678135

Confirmed

Expansion A

Normal

26.2, 26.3 Snapshot 7, 26.3 Snapshot 8, 26.3 Snapshot 9, 26.3 Snapshot 10, 26.3 Pre-Release 1, 26.3, 26.4 Snapshot 2, 26.4 Snapshot 3

Retrieved