Affects Version/s: Minecraft 1.13-pre1, 1.15.2
Fix Version/s: None
If there are multiple items in the output slot and some of the stack is taken, e.g. by right clicking or pressing Q, the tracked recipe backlog will be fully cleared instead of just clearing the amount of recipes that matched the amount of items removed. The player will then get the experience for this entire backlog of recipes even though they didn't take all the items. Taking more items from the output slot gives no experience unless more is smelted, where in that case only those newer recipes' experience is given.
With the JSON smelting recipes in 1.13, the Furnace keeps track of the different recipes it has done in order to give the proper amount of experience when the player takes the result from the output slot.
The NBT of a freshly placed Furnace contains the NBT Short tag:
When something is smelted, for example a Log into Charcoal, this value is increased by one and some additional tags are added to keep track of this recipe.
Smelting another Log will increase RecipeAmount0 by 1.
Assuming some Data Pack called melonpack adds a recipe to smelt, for example, Melons into Charcoal with the filename melon_to_charcoal.json, one can insert a Melon into a Furnace, allowing the results of both recipes to stack since they are the same item. Once done smelting, the NBT will look like this:
This recipe tracking is done so that once the player takes this stack of items out, they are given the total experience from all of the recipes. In this case, 2x the experience from minecraft:charcoal, and 1x the experience from melonpack:melon_to_charcoal.