Referencing empty item tag in recipe can crash client
Description
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
- Install the attached data pack on your world
- Grant yourself the contained recipe using the command
/recipe give @s recipe_example:recipe - Enter the UI of a crafting table
- Open the recipe book
- Select the "Blocks" category
- Attempt to select the new recipe, which should be recognizable through its bedrock icon
What I expected to happen
Either one of three things:
- The recipe can't be found in the recipe book even if granted
- The input items are shown as air
- The recipe fails loading
2020-08-04, 06:09 PM
2020-11-06, 10:41 AM
2020-08-17, 03:44 PM
1
2