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.
Comments 3
OK, troubleshooting this deeper...
If you run that mcfunction directly, for example, as a command /function gatkong:gatpack/advancements/panic, it works as intended.
If you run that mcfunction as a reward to an advancement (which is how I am executing the mcfunction and found this new bug), it does not work as intended. It successfully summons the pig, but It can't find the summoned entity in that same tick-run of the mcfunction.
Sooo... oddly... this bug expression depends on how the mcfunction is called, apparently.
My datapacks use advancements as triggers for many of their mcfunctions, and all such instances where something must happen to a summoned entity have stopped working in 1.16.
Can't reproduce