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

Referencing empty item tag in recipe can crash client


    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w45a
    • 1.16.1, 1.16.2 Pre-release 1
    • None
    • Plausible
    • Crash
    • Very Important


      The game crashes with the error message "The game crashed whilst rendering screen Error: java.lang.ArithmeticException: / by zero" when selecting a recipe in the recipe book that references an item tag that contains no entries as an ingredient of the recipe.

      How to reproduce

      1. Install the attached data pack on your world
      2. Grant yourself the contained recipe using the command
        /recipe give @s recipe_example:recipe
      3. Enter the UI of a crafting table
      4. Open the recipe book
      5. Select the "Blocks" category
      6. Attempt to select the new recipe, which should be recognizable through its bedrock icon

      What I expected to happen

      Either one of three things:

      1. The recipe can't be found in the recipe book even if granted
      2. The input items are shown as air
      3. The recipe fails loading

            fry [Mojang] Georgii Gavrichev
            HalbFettKäse HalbFettKäse
            1 Vote for this issue
            2 Start watching this issue