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

Can't Detect Recently Summoned Area Effect Clouds in Scope of player_hurt_entity Advancement if Damage Was Dealt by an Arrow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.16.5
    • None
    • Windows 10, Java 1.8.0.
    • Unconfirmed
    • (Unassigned)

      Consider an advancement with the player_hurt_entity criterion that triggers a reward function that summons an area effect cloud. If the damage dealt to the entity was from an arrow that the player launched, then any attempt to detect this area effect cloud within the scope of that reward function will fail.

      Steps to reproduce:

      1. Make an advancement of the form:

      {
        "criteria": {
          "attack": {
            "trigger": "minecraft:player_hurt_entity",
            "conditions": {}
          }
        },
        "rewards": {
          "function": "<the function below>"
        }
      }

      2. Make a function of the form:

      advancement revoke @s only <the advancement above>
      execute at @s run summon area_effect_cloud ~ ~ ~ {Radius:5f,Duration:20,Tags:['test']}
      execute if entity @e[type=area_effect_cloud,tag=test] run say hi

      3. Replace the function and advancement references above with the relevant namespaced IDs.

      4. Shoot an entity with a bow and arrow.

      5. Observe that the AEC is visible briefly, but the "hi" message is not produced.

      Note that this does not seem to happen with other entity types (e.g. attempting the same procedure with an armor stand instead of an AEC does not reproduce the bug). Also note that this doesn't happen with melee attacks (i.e. trying to directly attack the entity will produce the "hi" message as expected). Moreover, trying to detect the AEC after it is summoned (i.e. through the chat) works normally.

            Unassigned Unassigned
            darkstar634 Dark Star
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: