Mojira Archive
MC-119047

Advancements NBT and such ignored on condition inventory_changed

The NBT, and durability tags etc are ignored in advancements when using inventory_changed

First a reference to the wiki where they give an example of inventory change
http://minecraft.gamepedia.com/Advancements

 {
       "criteria": {
           "example": {
               "trigger": "minecraft:inventory_changed",
               "conditions": {
                   "items": [
                       {
                           "item": "minecraft:stone",
                           "data": 2,
                           "count": {
                               "min": 5,
                               "max": 10
                           }
                       },
                       {
                           "item": "minecraft:wool",
                           "data": 5
                       },
                       {
                           {color:red}"item": "minecraft:wooden_sword",
                           "durability": {"min": 50},
                           "nbt": "{display:{Name:\"Example\"}}"{color}
                       }
                   ],
                   "slots": {
                       "occupied": 3
                   }
               }
           }
       }
   }

So I marked the problem red. the item works fine, but if I give myzelf an sword thats called "not this one" and is almost broken (damage below 50) the game still gives me the achievements.

So I tried this:

"trigger": "minecraft:inventory_changed",
    "conditions": {
        "nbt": "{display:{Name:\"Example\"}}"
}

but this allowed all items to be used nomatter what name (also tried removing the "\" but din't effect the results)

Invalid

Jelle Wietsma

2017-06-27, 10:25 PM

2017-06-28, 12:18 AM

2017-06-28, 12:18 AM

0

1

Unconfirmed

Minecraft 1.12

-