This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
This used to work in 1.12, but after I updated the code to 1.13, the advancement no longer recognizes the custom item name is consumed.
To begin,
I altered the Witch loot table and she successfully drops this potion:
{ "type": "item", "name": "minecraft:potion", "weight": 2, "quality": 1, "functions": [ { "function": "set_nbt", "tag": "{ Potion:\"minecraft:empty\", CustomPotionEffects: [ { Id: 16, Amplifier: 0, Duration: 200 } ], display: { Lore: [ \"§r§9Spectral (0:10)§r\", \"Mysterious Concoction\" ] }, CustomPotionColor:16777215 }" }, { "function": "set_name", "name": { "text": "Spectral Potion" } }, { "function": "set_count", "count": { "min": 1, "max": 2 } }, { "function": "looting_enchant", "count": { "min": 1, "max": 2 } } ] },
That works, the Witch drops the custom potion with the custom name.
Then, I have this advancement that I want the player to earn when they drink the above custom potion, but it doesn't recognize the item name.
{ "display": { "icon": { "item": "minecraft:potion" }, "title": { "text": "Spectral" }, "description": { "text": "Drink a Spectral Potion" }, "show_toast": true, "announce_to_chat": false, "hidden": false }, "parent": "namespace:all_effects2", "criteria": { "drinkspectralfxn": { "trigger": "minecraft:consume_item", "conditions": { "item": { "nbt": "{display:{Name:\"Spectral Potion\"}}" } } } }, "rewards": { "function": "namespace:z007" } }
Under 1.12, it used to work great. After updating to 1.13 syntax, it doesn't :\ The advancement doesn't see the player is drinking the named potion.
Any ideas what I'm missing?
Thanks all.
[edit: made sure I posted the code correctly]
This used to work in 1.12, but after I updated the code to 1.13, the advancement no longer recognizes the custom item name is consumed.
To begin,
I altered the Witch loot table and she successfully drops this potion:
{ "type": "item", "name": "minecraft:potion", "weight": 2, "quality": 1, "functions": [ { "function": "set_nbt", "tag": "{ Potion:\"minecraft:empty\", CustomPotionEffects: [ { Id: 16, Amplifier: 0, Duration: 200 } ], display: { Lore: [ \"§r§9Spectral (0:10)§r\", \"Mysterious Concoction\" ] }, CustomPotionColor:16777215 }" }, { "function": "set_name", "name": { "text": "Spectral Potion" } }, { "function": "set_count", "count": { "min": 1, "max": 2 } }, { "function": "looting_enchant", "count": { "min": 1, "max": 2 } } ] },That works, the Witch drops the custom potion with the custom name.
Then, I have this advancement that I want the player to earn when they drink the above custom potion, but it doesn't recognize the item name.
{ "display": { "icon": { "item": "minecraft:potion" }, "title": { "text": "Spectral" }, "description": { "text": "Drink a Spectral Potion" }, "show_toast": true, "announce_to_chat": false, "hidden": false }, "parent": "namespace:all_effects2", "criteria": { "drinkspectralfxn": { "trigger": "minecraft:consume_item", "conditions": { "item": { "nbt": "{display:{Name:\"Spectral Potion\"}}" } } } }, "rewards": { "function": "namespace:z007" } }Under 1.12, it used to work great. After updating to 1.13 syntax, it doesn't :\ The advancement doesn't see the player is drinking the named potion.
Any ideas what I'm missing?
Thanks all.
[edit: made sure I posted the code correctly]