Hi, Im new to datapacks and i was wondering. Is it possible to make an advancement which you get after finishing simple skyblock-like cobblestone generator? Are there some conditions i can use for that or its not possible? What i would like to make is getting advancement when water meets lava and im not sure how to begin or what conditions i should use. Sorry if i used wrong tag, im not sure which one i suppose to use since there is no advancement tag.
#Making custom advancement which you get after finishing building a certain things?
1 messages · Page 1 of 1 (latest)
It's not easily possible, as advancement run as and at the player but maybe there is a clever work around..
I’d this on an actual skyblock map? Can you maybe check for a specific amount of cobblestone?
You could "brute force" it and check for such a combination any time the player uses a bucket of lava and water. Although "checking for such a combination" is quite difficult
You can also just assume that, if the player uses water and lave right after each other, they made a generator
hmm...now when im looking at criteria and triggers ive noticed "minecraft:inventory_changed"
i could just check for cobblestone to show in inventory and give achievement, tho its far from what i want it seems the easiest and most possible way
You can also combine that, so it checks that you
- have placed water,
- have placed lava and
- have collected cobblestone,
To prevent some misfires
yeah but i dont know how to do it, idk how to check "if" in datapacks, im thinking rn how to put achevements in one tab instead of two because ive made two new achievements but they are in different tabs, i thought keeping them in one subfolder will do the trick but nope
i started with datapacks like 5 hours ago
i got used to recipes and loot tables and sofar advancements are hardest for me hah
You can't really check "if" in advancements but you can use multiple criteria and then, the advancement only "fires" if all of them are completed
I highly recommend this generator fill all of those files: https://misode.github.io/advancement/
To check if you placed a block you'd use the item_used_on_block criteria and to check for cobblestone, like you said, the inventory_changed criteria
item_used_on_block, i've tried it but i have problems implementing it even with preview im not sure how to bend it to my needs
You need to tell one of the achievements that it’s "parent" is the first, the "root" achievement
ahh, so i need to add something to root.json
This criteria only triggers if you are actually using it, so doing the swinging animation, placing a bucket should work
aight, i will play with it till it works
👌🏼 report back if you're stuck ;)
okay thanks
oh actually @nova karma
{
"criteria": {
"example": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"location": {
"biome": "minecraft:gravelly_hills",
"block": {
"tag": "minecraft:campfires"
}
},
"item": {
"items": [
"minecraft:porkchop"
]
}
}
}
}
}
this is example code for item used
now can i skip biome?
completely remove it so it works on every biome
Yes, just remove it ^^
aight!
yeah, i already got stuck, i dont understand this trigger
soo i want to test if i get achievement after placing water on dirt
{
"display": {
"icon": {
"item": "minecraft:cobblestone"
},
"title": "name",
"description": "description"
},
"criteria": {
"water_test": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"location": {
"block": {
"tag": "minecraft:dirt"
}
},
"item": {
"items": [
"minecraft:water_bucket"
]
}
}
}
}
}
and it aint working but i have no idea whats wrong
Try to remove the whole "location" part (including the dirt block) and see if that works
It should then work on all blocks
oh!
Also, it doesn't work because you are referring to a block tag but you are giving it a block
Block tags are lists of multiple blocks
oh, okay then i misunderstood what tag is
It’s a different file all together ^^
and no its not working
Do you see the advancement in the "autocomplete" if you try to run advancement give @s only …?
Or advancement revoke …
no, its not showing now tho i changed everything from "trigger" nothing above
Then the game probably doesn’t recognize it
If you want to debug it, maybe it is good to turn on the debug log
You can also send your current version and maybe I can spot the error
okay
it seems like game sees these 2 advancements i made
but does absolutely nothing when i trying trigger it
second one works just fine
you mean code or more logs
Th advancement
{
"display": {
"icon": {
"item": "minecraft:cobblestone"
},
"title": "name",
"description": "description"
},
"criteria": {
"advancement": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"item": {
"items": [
"minecraft:water_bucket"
]
}
}
}
}
}
Does it show up now ingame? Using the advancement command?
If not try this, it does not get any more bare bones
{
"criteria": {
"requirement": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"item": {
"items": [
"minecraft:water_bucket"
]
}
}
}
}
}
Although it should be the exact same, just without picture and stuff
no its not workin
Did this, or this with the location removed work?
Okay, so then it might be the water_bucket making problems. Can you try it with an empty_bucket instead?
You can also just remove all criteria and check if placing a buckets triggers this advancement at all
Just remember to revoke it if you got it once before
what do you mean exactly by removing all criteria
{
"criteria": {
"requirement": {
"trigger": "minecraft:item_used_on_block"
}
}
}
This ^^
with placed block it works
what about
i wanted to try it earlier but i had troubles implementing it
{
"criteria": {
"requirement": {
"trigger": "minecraft:placed_block",
"conditions": {
"item": {
"items": [
"minecraft:water_bucket"
]
}
}
}
}
}
I'd try something like this
i mean its what i did and it works
The block/fluid check checks are for where you place it at
Awesome no?
Now you can just do this by adding multiple criteria
Just call them differently and add commas
hmm alright
adding another criteria makes my VScode go berserk on me
Like this
{
"criteria": {
"requirement": {
"trigger": "minecraft:placed_block",
"conditions": {}
},
"jeigke": {
"trigger": "minecraft:brewed_potion",
"conditions": {}
}
}
}
oh this way
okay
it works
thanks so much for help
tho im still mad item used on block doesnt work with buckets
I still really recommend this generator, I use it all the time, but I think it is good to understand what is happening and why
Me too ^^
now i still have to figure out how to connect this advancement to the root.json
so its one tab
so i should copy whole code of this advancement to root file and set root as parent
i mean yeah but do i need to type new advancements in root and not in new file
if i want them in one category
You should just be able to reference another advancement as a parent
And it should be in the same category
ughhh sorry for being such a bother but where the heck i put parent: here
The same level as criteria
{
"display": {
"icon": {
"item": "minecraft:dirt"
},
"title": {
"text": "Skyblock",
"color": "#fc03a1",
"bold": true,
"italic": true
},
"description": {
"text": "Skyblock"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/block/obsidian.png"
},
"criteria": {
"player_start": {
"trigger": "minecraft:location",
"conditions": {
"player": {
"location": {
"position": {
"y": {
"max": -40,
"min": -50
}
}
}
}
}
}
},
"rewards": {
"experience": 10
}
}
its my root.json
You are not a bother, this is a help thread :D
so i put parent instead of criteria in root.json
{
"display": {
"icon": {
"item": "minecraft:dirt"
},
"title": {
"text": "Skyblock",
"color": "#fc03a1",
"bold": true,
"italic": true
},
"description": {
"text": "Skyblock"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/block/obsidian.png"
},
"parent": "<namespace>:<my_parent_root_thing>",
"criteria": {
"player_start": {
"trigger": "minecraft:location",
"conditions": {
"player": {
"location": {
"position": {
"y": {
"max": -40,
"min": -50
}
}
}
}
}
}
},
"rewards": {
"experience": 10
}
}