4
Custom Advancements
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?
{
"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?
2
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).
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).
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.
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.
