Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3339

Update Recipe API to handle 1.12 format of ingredients

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None

      What used to be a wildcard durability value is now declared as different items in ingredients for recipes in 1.12.

      For example, the following recipe used to have planks with a durability of Short.MAX_VALUE to declare it could use any type. It now only returns 0 for the durability.

      {
        "type": "crafting_shaped",
        "pattern": [
          "###",
          "###"
        ],
        "key": {
          "#": [
            {
              "item": "minecraft:planks",
              "data": 0
            },
            {
              "item": "minecraft:planks",
              "data": 1
            },
            {
              "item": "minecraft:planks",
              "data": 2
            },
            {
              "item": "minecraft:planks",
              "data": 3
            },
            {
              "item": "minecraft:planks",
              "data": 4
            },
            {
              "item": "minecraft:planks",
              "data": 5
            }
          ]
        },
        "result": {
          "item": "minecraft:trapdoor",
          "count": 2
        }
      }
      

      I'm hoping the multiple ingredients can be integrated into recipes so that we can determine whether a recipe is using only data/durability 0 or in this case data 0-5 as well as use this functionality for creating/overriding recipes.

       

            Unassigned Unassigned
            haveric Ryan Breuer
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: