You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
2.0 KiB
62 lines
2.0 KiB
--- ../src-base/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java |
|
+++ ../src-work/minecraft/net/minecraft/item/crafting/FurnaceRecipes.java |
|
@@ -14,8 +14,9 @@ |
|
public class FurnaceRecipes |
|
{ |
|
private static final FurnaceRecipes smeltingBase = new FurnaceRecipes(); |
|
- private Map smeltingList = new HashMap(); |
|
+ public Map smeltingList = new HashMap(); // CraftBukkit - private -> public |
|
private Map experienceList = new HashMap(); |
|
+ public Map customRecipes = new HashMap(); // CraftBukkit |
|
private static final String __OBFID = "CL_00000085"; |
|
|
|
public static FurnaceRecipes smelting() |
|
@@ -23,7 +24,7 @@ |
|
return smeltingBase; |
|
} |
|
|
|
- private FurnaceRecipes() |
|
+ public FurnaceRecipes() // CraftBukkit - private -> public |
|
{ |
|
this.func_151393_a(Blocks.iron_ore, new ItemStack(Items.iron_ingot), 0.7F); |
|
this.func_151393_a(Blocks.gold_ore, new ItemStack(Items.gold_ingot), 1.0F); |
|
@@ -76,16 +77,37 @@ |
|
this.experienceList.put(p_151394_2_, Float.valueOf(p_151394_3_)); |
|
} |
|
|
|
+ // CraftBukkit start |
|
+ public void registerRecipe(ItemStack itemstack, ItemStack itemstack1) |
|
+ { |
|
+ this.customRecipes.put(itemstack, itemstack1); |
|
+ } |
|
+ // CraftBukkit end |
|
+ |
|
public ItemStack getSmeltingResult(ItemStack p_151395_1_) |
|
{ |
|
- Iterator iterator = this.smeltingList.entrySet().iterator(); |
|
+ // CraftBukkit start |
|
+ boolean vanilla = false; |
|
+ Iterator iterator = this.customRecipes.entrySet().iterator(); |
|
+ // CraftBukkit end |
|
Entry entry; |
|
|
|
do |
|
{ |
|
if (!iterator.hasNext()) |
|
{ |
|
- return null; |
|
+ // CraftBukkit start |
|
+ if (!vanilla) |
|
+ { |
|
+ iterator = this.smeltingList.entrySet().iterator(); |
|
+ vanilla = true; |
|
+ } |
|
+ else |
|
+ { |
|
+ return null; |
|
+ } |
|
+ |
|
+ // CraftBukkit end |
|
} |
|
|
|
entry = (Entry)iterator.next();
|
|
|