Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5290

Invulnerable and/or Marker armor stand triggers EntityDamageEvent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Java 11 (Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS) Host: Windows 10 10.0 (amd64)

    • CraftBukkit version git-Spigot-798ea6a-b2bcde8 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
    • Yes

      Expected:

      Armor stands (like all other living entities) should check if they are invulnerable first before checking anything else when damaged.

      Observed:

      Armor stands (unlike any other living entity) requests NonLivingEntityDamageEvent handle and checks if it is canceled before anything else.

      Steps to reproduce:

      1. Spawn an armor stand using either org.bukkit.World#spawn method, org.bukkit.World#spawnEntity, or spawning manually through NMS classes.
      2. Set either or both of the invulnerable and marker properties to true.
      3. Damage the armor stand in any way.

      Build number:

      Paper version git-Paper-175 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

      Notes:

      The issue is at net.minecraft.server.v_?.EntityArmorStand#damageEntity.
      Take a look at the differences between this method and net.minecraft.server.v_?.EntityLiving#damageEntity.
      Pretty sure whoever coded this was trolling since it doesn't match any of the other damageEntity methods from other classes extending EntityLiving.
      (It may also be worth checking net.minecraft.server.v1_14_R1.EntityLiving#damageEntity0 and
      net.minecraft.server.v1_14_R1.EntityArmorStand#e, the latter of these is missing its de-obfuscated name as well)

            Unassigned Unassigned
            xt449 Binary Banana
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: