mojira.dev
MC-269321

Attack sounds are played at the player's position rather than at the entity being attacked.

When attacking an entity, sounds such as

minecraft:entity.player.attack.strong

,

minecraft:entity.player.attack.crit

,

minecraft:entity.player.attack.knockback

, and

minecraft:entity.player.attack.sweep

are played at the player's position instead of the entity's position. While this could be intentional, it's inconsistent with entity interactions triggered by right-clicking, where sounds are played at the entity's position as expected. For instance, shearing a sheep produces the shearing sound at the sheep's position. It's unclear when sounds like

minecraft:entity.player.attack.weak

and

minecraft:entity.player.attack.nodamage

play. This discrepancy might be intentional to prevent excessively loud sounds for the attacking player upon hitting another player. Testing becomes simpler by increasing the

minecraft:player.entity_interaction_range

attribute. This issue is related to MC-268946.

Linked issues

Comments 3

This also impacts the sounds of the new mace when attacking entities during a fall.

As this is set to no user I have resolved this as incomplete.

Please update the description to inclue steps to reproduce this issue, as well as expected VS observed results.

Please also attach any needed datapacks, resourcepacks, screenshots, videos or worlds needed to help reproduce this issue.

— As this is set to no user I have resolved this as incomplete.
You set this to "No User" yourself. I have created MC-270554 now.

oowooglac

No User

(Unassigned)

Unconfirmed

(Unassigned)

1.20.4, 24w10a, 24w11a

Retrieved