Minecraft Blogs / Tutorial

1.17 Custom Advancements Won't Work? Start Here!

  • 94 views, 1 today
  • 2
  • 0
KoalAidGotGeico avatar KoalAidGotGeico
Level 38 : Artisan Mlem Mlem Bat
In Minecraft Java, 1.17, I've found a problem...
Custom advancements will NOT work!

So until then we'll have to improvise...

Firstly, decide what advancement you want to make. In my case, I'll make an advancement for eating a pumpkin pie.

After that, we'll want a utility advancement based on this. So lets make an advancement here.
The json of my utility advancement:
2 "__comment": "Made with TheDestruc7i0n's advancements generator: advancements.thedestruc7i0n.ca",
3 "criteria": {
4 "pumpkinpie": {
5 "trigger": "minecraft:consume_item",
6 "conditions": {
7 "item": {
8 "item": "minecraft:pumpkin_pie"
13 }
14 }
15 }
16 },
17 "rewards": {
18 "function": "koa_combat:regens/food/pumpkin_pie"
19 }

WAIT!... We're not done...
We still need another advancement.
This will be our actual advancement aka the one that pops up in chat or on your screen. (If you're making an advancement datapack if you're not, skip this step. Start reading from one line above the orange h below.)

My advancement:
2 "__comment": "Made with TheDestruc7i0n's advancements generator: advancements.thedestruc7i0n.ca",
3 "display": {
4 "title": {
5 "text": "Autumnal Bloom!"
6 },
7 "description": {
8 "text": "Eat a pumpkin pie!"
9 },
10 "icon": {
11 "item": "minecraft:pumpkin_pie"
12 },
13 "frame": "task",
14 "show_toast": true,
15 "announce_to_chat": true,
16 "hidden": false
17 },
18 "criteria": {
19 "h": {
20 "trigger": "minecraft:impossible"
21 }
22 }

Ok, NOW, we're do-
Did you even remember that the advancements are BROKEN in 1.17??? Yeah, if you thought we were done then I didn't think so.
As of currently, nothing will happen we still need a function. Or, rather two functions.
I'm not covering how to make functions in this post. Rather, I'll just tell you what you need to do in your function.
The first function you're going to need is a load function (if you don't know how to make a datapack, search up 'how to make a datapack' on Youtube.) In this load function place the following command:
scoreboard objectives add <scoreboard name, my scoreboard name is nrfs_sspp> <the scoreboard trigger, mine is minecraft.used:minecraft.pumpkin_pie>

Once you have that, make another function. Remember the first utility advancement we made? Yeah, that's going to come in handy now. The bottom line that say "Function": needs to have your function's path here. Not the load one but the one we're making right now. In my case, my function's path is koa_combat:regens/food/pumpkin_pie so I'll put "Function": "koa_combat:regens/food/pumpkin_pie" in place of where the old function once was.
My function + what you need to put in your function.
######### Seasonal Sweets #########
advancement revoke @s only koa_combat:eating/pumpkin_pie <----- This is the path of my utility advancement aka the folders it's located in. Replace this with the path of your UTILITY advancement.

execute if score @s nrfs_sspp matches 1.. run effect give @s regeneration 3 1 true <--- [You can replace the text "effect give @s regeneration 3 1 true" with whatever function you want to happen (optional)]
scoreboard players reset @s nrfs_sspp <--- Replace nrfs_sspp with whatever your scoreboard is named.

<if you're making an advancement datapack, remember that advancement we made earlier(not the utility one)? Yeah, you'll need to put the path of that advancement in place of 'koa_combat:eating/pumpkin_pie_adv' in the following command>
advancement grant @s only koa_combat:eating/pumpkin_pie_adv (optional if you're making an advancement datapack)

And now, if you did everything right, your datapack should work.

Create an account or sign in to comment.

Planet Minecraft


© 2010 - 2021