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

Attacker isn't reset if the entity is damaged by something else

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 23w03a
    • None
    • Confirmed
    • (Unassigned)

      If an entity (A) is attacked by another (B), B will be the attacker of A for 5s. That's how it works.

      (And if entity C damages A, it replaces B as A's attacker).

      But if A is damaged by another source than an entity, like a fall damage, a fire, a cactus, ... Then the attacker is not reset and we still detect B as the attacker of A.

      If this is noted as "working as expected", which can be justified. Perhaps we could have a new argument for "/execute on": "victim". That way we could know who the victim of the entity's last attack is. Because "target" does not work on players.

            Unassigned Unassigned
            SozoKa SozoKa
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: