4

Custom Advancements

GamerGrumpa 1/26/22 4:37 pm
129
8/17/2023 8:26 am
Here is a portion of my code:

{
"criteria": {
"Start Dirt Age": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": [
"minecraft:dirt"
],
"count": 1
}
]
}
}
}
}

I only want dirt to trigger this but anything added to inventory triggers it. What am I doing wrong?
Posted by
GamerGrumpa
Level 1 : New Miner
7

  Have something to say?

JoinSign in

2

Niknokinater
01/26/2022 4:59 pm
Level 45 : Master Architect
It looks like your usage of "item" should instead be "items" as well.

Additionally, just in case, I wouldn't use spaces or caps in the criteria namespace (that's just me though- as it sounds like your advancement still functions).
3
GamerGrumpa
01/26/2022 5:27 pm
Level 1 : New Miner
Yes, that was the problem. Thanks.

And that is probably good advice about the criteria namespace. Part of this code was generated by an online app and I wasn't sure what I was doing or needed.
3

Welcome