Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-270554

Player attack sounds emanate from the player's position rather than the position of the attacked entity

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 24w14a, 1.20.5 Pre-Release 1
    • None
    • Confirmed
    • Sound

      This issue is related to MC-268946. Clones MC-269321.
      When attacking an entity, sounds such as

      minecraft:entity.player.attack.strong

      ,

      minecraft:entity.player.attack.crit

      ,

      minecraft:entity.player.attack.knockback

      ,

      minecraft:entity.player.attack.sweep

      ,

      minecraft:item.mace.smash_air

      ,

      minecraft:item.mace.smash_ground

      ,

      minecraft:item.mace.smash_ground_heavy

      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.

      Steps to reproduce

      1. /attribute @s minecraft:player.entity_interaction_range base set 64
      2. /summon minecraft:warden ~ ~ ~ {NoAI:1b,Silent:1b}
      3. Be far away from it (about 50 blocks)
      4. Attack the warden
      5. Attack the warden with a critical hit
      6. Attack the warden with a sweeping attack
      7. Attach the warden while sprinting to do a knockback attack
      8. Attack the warden while falling by using a mace
      9. Come closer to the warden
      10. Repeat steps 4-8

      Observed: All attack sounds were heard at your position, as evidenced by their consistent volume regardless of proximity to the warden.
      Expected: All attack sounds should originate from the warden's position, meaning they should either be inaudible from a distance or barely audible.

            Unassigned Unassigned
            NoUser No User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              CHK: