Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 44 lines 1.5 kB view raw
1package net.minecraft.server; 2 3import java.util.HashMap; 4import java.util.Map; 5 6import uk.betacraft.uberbukkit.Uberbukkit; 7 8public class FurnaceRecipes { 9 10 private static final FurnaceRecipes a = new FurnaceRecipes(); 11 private Map b = new HashMap(); 12 13 public static final FurnaceRecipes getInstance() { 14 return a; 15 } 16 17 private FurnaceRecipes() { 18 this.registerRecipe(Block.IRON_ORE.id, new ItemStack(Item.IRON_INGOT)); 19 this.registerRecipe(Block.GOLD_ORE.id, new ItemStack(Item.GOLD_INGOT)); 20 this.registerRecipe(Block.DIAMOND_ORE.id, new ItemStack(Item.DIAMOND)); 21 this.registerRecipe(Block.SAND.id, new ItemStack(Block.GLASS)); 22 this.registerRecipe(Item.PORK.id, new ItemStack(Item.GRILLED_PORK)); 23 this.registerRecipe(Item.RAW_FISH.id, new ItemStack(Item.COOKED_FISH)); 24 this.registerRecipe(Block.COBBLESTONE.id, new ItemStack(Block.STONE)); 25 this.registerRecipe(Item.CLAY_BALL.id, new ItemStack(Item.CLAY_BRICK)); 26 27 if (Uberbukkit.getTargetPVN() >= 8) { 28 this.registerRecipe(Block.LOG.id, new ItemStack(Item.COAL, 1, 1)); 29 this.registerRecipe(Block.CACTUS.id, new ItemStack(Item.INK_SACK, 1, 2)); 30 } 31 } 32 33 public void registerRecipe(int i, ItemStack itemstack) { 34 this.b.put(Integer.valueOf(i), itemstack); 35 } 36 37 public ItemStack a(int i) { 38 return (ItemStack) this.b.get(Integer.valueOf(i)); 39 } 40 41 public Map b() { 42 return this.b; 43 } 44}