mojira.dev
MC-124667

Air can be used in custom recipes, causing a crash

The bug

You can use minecraft:air as recipe input and output; using it as output then clicking on this recipe will crash the game.

How to reproduce

Create a recipe using air (as input or output).

Examples:

{
  "type": "crafting_shapeless",
  "ingredients": [
    {
     "item": "air"
    }
  ],
  "result": {
    "item": "diamond"
  }
}

Recipe for crafting diamond out of 1 air

{
  "type": "crafting_shapeless",
  "ingredients": [
    {
     "item": "diamond"
    }
  ],
  "result": {
    "item": "air"
  }
}

Recipe for crafting air out of 1 diamond.

Comments 3

Please avoid changing the description so often, the preview button is for that.

I wouldn't say being able to use air in repices is a bug. As you can't implement while in survival, or even ingame.
But the crash from crafting it, should be fixed

I'd like to add that this crash can also be produced by using any output with count=0

Hugman_76

slicedlime

Confirmed

Very Important

Crash

air, crash, recipe, recipe-book-tab

Minecraft 1.12.2, Minecraft 18w03b, Minecraft 18w07c, Minecraft 18w20b, Minecraft 18w20c, ..., 1.16.2, 1.16.4, 20w45a, 1.16.5, 21w08b

21w13a

Retrieved