Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 17 lines 689 B view raw
1package net.minecraft.server; 2 3import java.util.Comparator; 4 5class RecipeSorter implements Comparator { 6 7 final CraftingManager a; 8 9 RecipeSorter(CraftingManager craftingmanager) { 10 this.a = craftingmanager; 11 } 12 13 public int compare(Object o1, Object o2) { 14 CraftingRecipe craftingrecipe = (CraftingRecipe) o1, craftingrecipe1 = (CraftingRecipe) o2; 15 return craftingrecipe instanceof ShapelessRecipes && craftingrecipe1 instanceof ShapedRecipes ? 1 : (craftingrecipe1 instanceof ShapelessRecipes && craftingrecipe instanceof ShapedRecipes ? -1 : (craftingrecipe1.a() < craftingrecipe.a() ? -1 : (craftingrecipe1.a() > craftingrecipe.a() ? 1 : 0))); 16 } 17}