The bug
The recipe book (correctly) auto-fills items based on the minimum stack size of the ingredients that are already in the crafting grid. However, when determining whether the player is holding enough ingredients to perform this action, the calculation uses the maximum stack size. As a result, ingredients sometimes remain in the player's inventory when a recipe is clicked.
How to reproduce
Example 1:
Clear all items from your inventory:
/clear
Ensure you have unlocked the block of iron recipe:
/recipe give @s iron_block
Give yourself 27 iron ingots and a crafting table:
/give @s iron_ingot 27
/give @s crafting_table
Place the crafting table and open it
In the recipe book, click on the block of iron recipe twice
Remove exactly one iron ingot from the crafting grid and place it back into your inventory
Click on the block of iron recipe once
→ ✔ The iron ingot that you removed from the crafting grid is sent back into the crafting gridCompletely remove one iron ingot from your inventory:
/clear @s iron_ingot 1
Open the crafting table and repeat steps 5-7
→ ❌ The iron ingot that you placed back into your inventory is not sent to the crafting grid
Example 2:
Ensure you are in Survival or Adventure mode:
/gamemode survival
Clear all items from your inventory:
/clear
Ensure you have unlocked the torch recipe:
/recipe give @s torch
Give yourself 3 sticks and 3 pieces of coal:
/give @s stick 3
/give @s coal 3
Open your inventory
In the recipe book, click on the torch recipe twice
Remove exactly one stick from the crafting grid and place it back into your inventory
Click on the torch recipe once
→ ✔ The stick that you removed from the crafting grid is sent back into the crafting gridCompletely remove one piece of coal from your inventory:
/clear @s coal 1
Repeat steps 5-8
→ ❌ The stick that you placed back into your inventory is not sent to the crafting grid
Linked issues
relates to 1
Attachments
Comments 2
This bug affects 1.19.3.
If you click on item that is already been crafting from the recipe book, depending on the maximum and minimum number of items in ingredient grid, the number of ingredients needed for the ingredients to be placed automatically seems to be determinded.
For example, when you put 7 planks and 4 sticks in ingredient compartments to craft 2 wooden pickaxe, 3 planks will be placed in one of the upper line's grid.
(There will be 2 in all other compartments,)
At this time, when you click on the wooden pickaxe in the recipe book,
The maximum number of placed ingredients is determined by 3 (because of 3 planks) and
The minimum number of placed ingredients is determined by 2 (because of oteher ingredients).
Because of the maximum number of placed ingredients (3), after clicking wooden pickaxe in the recipe book, the number of items to be crafted is determined by 4 on a temporary.
So, To make 4 wooden pickaxes, 5 more planks and 4 more sticks are needed.
(when you try it in game, if the number of planks or sticks is not enough, it will not be automatically placed.)
However, the number of item to be placed on the crafting table grid is set to 3 accoding to the minimum number of placed ingredients. so 3 planks and 2 sticks were left in your inventory.
[media]When determining the number of ingredients to be transferred to the crafting grid, it seems that the maximum numbers of placed ingredients should not be followed.
I was able to reproduce this in 20w45a. Also, this might be related to MC-147729?