mojira.dev
MC-304406

The Knockback enchantment on spears does not work if the spear is in your off hand

Steps to reproduce the issue:

Spawn 2 armor stands and give yourself a knockback enchanted wooden spear.

Charge attack the first armor stand with the spear in your main hand. Notice how far it goes. Expected result

Charge attack the second armor stand with the spear in your off hand. Notice how it doesn’t go as far as the first. Actual result

Comments 2

Additional Notes for this (1.21.11):
Using an unenchanted spear in your offhand with a Knockback II sword in your main hand causes the charge attack of the spear to gain the Knockback II effect. Sharpness is also affected, both in terms of particles and mechanics.

If you spawn a cow and observe how many charge hits it takes to kill, how far it is knocked back, and whether or not the sharpness particles appear using a spear’s charge (at a regular sprint) with the following setups, you get the following results:

  • Unenchanted Netherite Spear (On-hand): 2 attacks, regular knockback, no particles

  • Sharpness V & Knockback II Netherite Spear (On-hand): 1 attack, far knockback, sharpness particles

  • Unenchanted Netherite Spear (Off-hand): 2 attacks, regular knockback, no particles

  • Sharpness V & Knockback II Netherite Spear (Off-hand): 2 attacks, regular knockback, no particles (Unexpected)

  • Unenchanted Netherite Spear (Off-hand) with Sharpness V & Knockback II Wooden Sword (On-hand): 1 attack, far knockback, sharpness particles (Unexpected)

  • Sharpness V Netherite Spear (Off-hand) with Sharpness V & Knockback II Wooden Sword (On-hand): 1 attack, far knockback, sharpness particles

Smite and Bane of Arthropods appear to have the same issue. Looting is also unavailable if the spear is in the offhand and is transferred over if it appears on an item in the on-hand, although I am unsure if this is intentional.

Conversely, Fire Aspect works as-expected, applying fire if the offhand spear is enchanted with Fire Aspect, but not if the offhand spear is unenchanted with a Fire Aspect weapon in the on-hand.

Can confirm in 26.1 snapshot 5

EMD

(Unassigned)

Confirmed

Platform

Low

Combat, Items

1.21.11 Pre-Release 1, 1.21.11 Pre-Release 3

Retrieved