mojira.dev
MC-244550

Empty Tags match Empty Slots in Shaped Recipes

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:

[media]

Environment

Windows 11
Latest Launcher, built-in JRE

Attachments

Comments 2

This behavior still exists on 1.19.2. This issue should ideally be fixed because otherwise, mods cannot use conventional common tags for compatibility. For example, if one mod adds a steel chest but no mods adding steel ingots are present, the first mod's steel chest recipe intended to be steel ingots surrounding a chest would accept just the chest.

This issue still exists in 22w42a.

migrated

gegy

Community Consensus

Crafting, Data Packs

1.18, 1.19.2, 22w42a

22w45a

Retrieved