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

Advancement rewards calling an mcfunction can't target an entity in same tick as when they are summoned

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.16.1
    • java 8 update 251
    • Unconfirmed
    • (Unassigned)

      To reproduce, create a mcfunction which summons a tagged entity and then looks for it. When executed directly it works as intended.

      When executed as a reward from an advancement, the pig can't be found within the same tick for some reason.

          • This is a critical bug, as it breaks all datapacks that use advancement triggers for mcfunctions to run on summoned entities in the same tick. ***
      summon minecraft:pig ~ ~ ~ {Tags:["panic"]}
      
      execute as @e[type=pig] run say pig
      
      execute as @e[tag=panic] run say panic
      
      tag @e[type=pig] remove panic

      There will be no say output this same tick.

      This used to work within the same tick for 1.15.2 and earlier.

      [Mod]tryashtar's comment below "Can't reproduce" was before my edit above to include that the mcfunction fails as described when triggered as an advancement reward. I'm not aware of tryashtar attempting to reproduce since I added this detail.

            Unassigned Unassigned
            Gatinh0 Scott Miller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: