#Advancement detection
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1738825547:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
You can do @a[advancements=…]
https://minecraft.wiki/w/Target_selectors
Hmm... Looking at this, I'm not sure if this is quite it.
Is there a way to manipulate it so it detects when any advancement is obtained?
Like, regardless of which one it is.
Ah, you want something to fire every time any advancement is optained
I don’t think that very straight forward
When you're editing an advancement you can add a function reward to fire something when it's obtained. The most straightforward way to generalise this to every advancement is, well, editing every advancement
(But notably "every advancement" includes every hidden advancement that is used by Minecraft only to unlock recipes, so even if you had a way to count them I'm sure it's not what you'd want)
Shoot.
Hmm...
Shot in the dark that I'm 60% expecting a no to:
Is there any way to detect when the advancement toast appears?
Not with a data pack, nope
Dang it.
Replacing or recreating (without display stuff) every advancement you want to detect is probably the only way
If you have a little coding experience outside of mcfunction you can probably write a script that does it for you
Unfortunately, I do not.
So my best course of action is to do this:
execute as @a[advancements={adv1}] at @s run (command)
execute as @a[advancements={adv2}] at @s run (command)
execute as @a[advancements={adv3}] at @s run (command)
execute as @a[advancements={adv4}] at @s run (command)
...
?
(If so, just one more question: Is there a way to make it only fire once when it finally proves true and not have it fire a gajillion times?)
Yeah, I'm just not gonna bother.