#Advancement detection

1 messages · Page 1 of 1 (latest)

vernal shell
#

Basically trying to do this:
execute as @a at @s (when @s advancements +1) run (yadda yadda yadda)
Of course I know that the format/means might be totally different to achieve this. Just trying to get a point across.

buoyant moonBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 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

tired furnace
vernal shell
#

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.

tired furnace
#

Ah, you want something to fire every time any advancement is optained

vernal shell
#

Yes

#

I think that's it.

tired furnace
#

I don’t think that very straight forward

vernal shell
#

Dang.

#

I shall keep this open then.

devout bobcat
#

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)

vernal shell
#

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?

tired furnace
#

Not with a data pack, nope

vernal shell
#

Dang it.

tired furnace
#

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

vernal shell
#

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.