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

Empty Tags match Empty Slots in Shaped Recipes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 22w45a
    • 1.18, 1.19.2, 22w42a
    • None
    • Windows 11
      Latest Launcher, built-in JRE
    • Community Consensus
    • Crafting, Data Packs

      In shaped recipes, empty tags match an empty slot, while in shapeless recipes, they don't. This also applies to tags that become empty from only having missing optional entries.

      See the attached data pack for an example recipe (9xempty tag->bedrock).

      Shapeless recipes don't exhibit this behavior. Probably because there was a related issue (MC-197009) reported for them back in 1.16, but shaped recipes are affected differently.

      Using this recipe, and an empty tag (empty_tag):

      {    "type": "minecraft:crafting_shaped",
          "pattern":
          [
              "xxx",
              "xxx",
              "xxx"
          ],
          "key":
          {
              "x": {
                  "tag": "recipe_example:empty_tag"
              }
          },
          "result":
          {
              "item": "minecraft:bedrock"
          }
      } 

      Nets this result ingame. Please note that you need to put an item into the grid and take it out to cause the game to re-evaluate the recipe and make this show up:

        1. image-2021-12-04-13-17-50-914.png
          2 kB
          Sebastian Hartte

            gegy1000 [Mojang] Gegy
            shartte Sebastian Hartte
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: