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

Some non-interactable entities do not override canBeAttackedWithItem() causing sounds when you hit them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.2, Minecraft 18w02a, 1.16.2, 1.16.5, 21w05a, 21w05b, 21w08b, 1.19
    • Confirmed
    • Sound

      Based on 1.11 decompiled using MCP 9.35 rc1

      The bug

      Some non-interactable entities like area effect clouds do not override the method net.minecraft.entity.Entity.canBeAttackedWithItem() to return false. This results in the sounds for the sound event entity.player.attack.nodamage being played and the held weapon having to recharge even though you cannot attack the entity in any situation.

      Affected entities (vanilla)

      These are the entities which can be punched using a vanilla client.

      List might be incomplete, last updated for 1.12

      • tnt

      Affected entities (modded)

      These are the entities which can be punched using a modded client which ignores if Entity.canBeCollidedWith() returns true.

      List might be incomplete, last updated for 1.12

      • area_effect_cloud
      • egg
      • ender_pearl
      • llama_spit
      • potion
      • snowball
      • xp_bottle
      • dragon_fireball

            Unassigned Unassigned
            marcono1234 [Mod] Marcono1234
            Votes:
            10 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: