Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-224524

Advancement minecraft:inventory_changed trigger compares same slot multiple times.

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 21w17a
    • None
    • None
    • Unconfirmed
    • (Unassigned)

    Description

      Putting the following criteria in an advancement:

              {
                 "trigger": "minecraft:inventory_changed",
                  "conditions": {
                      "items": [
                          

      {                         "item": "minecraft:iron_nugget",                         "count": 64                     }

      ,
                          {
                              "item": "minecraft:iron_nugget",
                              "count": 

      {                             "min": 36                         }

                          }
                      ]
                   }
                 }
      Will trigger the advancement with only 64 iron ingots in the inventory (as it matches both specified items). I expected that it would only trigger when there are two slots filled with iron nuggets, one with 64 and one with at least 36.
       
      There was another issue about the counts not going cross-slot which was marked as "works as intended", but if the item declarations also check slots multiple times it becomes difficult if not impossible to check for more than one stack amount of the item with advancements.
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Bertie2011 Bertie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: