Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w07c, Minecraft 1.13-pre5, Minecraft 1.13, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 19w03b, Minecraft 19w03c, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, 1.15.2, 20w06a, 20w07a
If a redstone clock powers command blocks with
- /recipe give @a *
- /recipe take @a *
in them the game crashes with following error-report:
The .zip file is the world that you can see on the picture with the setup. YouTube video showing the bug.
The code line causing this exception to be thrown is (MCP line 43):
The problem appears to be that the algorithm to determine which item of the item recipes the player receives should be shown in the recipe toast divides delta by zero whenever (long)this.recipesOutputs.size() is > 5000L.
Forge team fixed this issue by simply rearranging arithmetic operations in order to make divisions by zero impossible (given that this.recipesOutputs.size() can never be zero):