Bukkit/CraftBukkit — pull request #1109 by THDigi (2013-03-29 17:24:13+00:00)
Title: Added support for data values on furnace recipes fixes BUKKIT-1657, BUKKIT-3846

Furnace recipes are stored by ingredient ID even though Bukkit API allows data value for ingredients, that makes API users rely on that until they find out that if they add two recipes with the same ingredient ID but diferent data values, only the last added recipe will work, the previous will be overwritten because it is stored by ID in the code, ignoring data value completly.

This commit changes how furnace recipes map's keys are stored, it uses a String instead of Integer.
Using a string will allow ID:data of ingredient to be stored when a specific data value is given.
If user choses to skip the data value he needs to enter 32757 (Short.MAX_VALUE) to act as a wildcard (like in workbench recipes) and if that value is detected only the ID is stored.
When getting the result it first looks for ID:data combination and if that is not found then it looks only for ID.

Bottom line, this allows plugins to add furnace recipes like the API advertises, with ID and data value for ingredients.

Ticket: https://bukkit.atlassian.net/browse/BUKKIT-1657

Also, while editing code for this commit I found a bug which I also fixed, details in the ticket: https://bukkit.atlassian.net/browse/BUKKIT-3846