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

Advancements treat the player as the "direct_entity" source of primed TNT damage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.13.2
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      When a player damages or kills an entity by igniting TNT, advancements should get a minecraft:player_hurt_entity and/or minecraft:player_killed_entity trigger, with the "direct_entity" set to the primed TNT in question and the "source_entity" set to the player that lit it.

      Instead, the "direct_entity" is always set to the player. Every other way the player has of damaging targets at a distance while giving the player credit (arrows, tridents, snowballs, eggs, splash/lingering potions of harming) sets the "direct_entity" to the correct target.

      To test this:

      • Add the attached data pack to a world. It prints a message when the player hurts or kills an entity, and an additional message if the "direct_entity" is the player or a primed TNT.
      • Hurt/kill an entity with your fist, and note that the "direct_entity" is correctly set to the player.
      • Hurt/kill an entity with a non-TNT projectile, and note that, since we receive no second message, the "direct_entity" is correctly not set to the player (nor, for some reason, to a primed TNT).
      • Hurt/kill an entity by lighting TNT with a flint and steel, and note that the "direct_entity" is incorrectly set to the player.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              AjaxGb AjaxGb
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: