[Bleeding] Handle custom furnace recipes separately. Fixes BUKKIT-1657, BUKKIT-3846

Due to vanilla blanket comparing data values, and the unspecified
order of hashmap iterators, we need to run through custom recipes
first, and therefore separately, to ensure that they are actually
used. By not adding the custom results to the experience table, we do
not override the experience gains from vanilla smelting recipes.
This commit is contained in:
t00thpick1
2013-12-20 18:44:13 -05:00
committed by feildmaster
parent 3c209a9884
commit 1ecc59d4d9
3 changed files with 22 additions and 3 deletions

View File

@@ -961,11 +961,13 @@ public final class CraftServer implements Server {
public void clearRecipes() {
CraftingManager.getInstance().recipes.clear();
RecipesFurnace.getInstance().recipes.clear();
RecipesFurnace.getInstance().customRecipes.clear();
}
public void resetRecipes() {
CraftingManager.getInstance().recipes = new CraftingManager().recipes;
RecipesFurnace.getInstance().recipes = new RecipesFurnace().recipes;
RecipesFurnace.getInstance().customRecipes.clear();
}
public Map<String, String[]> getCommandAliases() {