| 1 | package net.minecraft.item.crafting;
|
| 2 |
|
| 3 | import net.minecraft.init.Blocks;
|
| 4 | import net.minecraft.init.Items;
|
| 5 | import net.minecraft.item.Item;
|
| 6 | import net.minecraft.item.ItemStack;
|
| 7 |
|
| 8 | public class RecipesTools
|
| 9 | {
|
| 10 | private String[][] recipePatterns = new String[][] {{"XXX", " # ", " # "}, {"X", "#", "#"}, {"XX", "X#", " #"}, {"XX", " #", " #"}};
|
| 11 | private Object[][] recipeItems = new Object[][] {{Blocks.planks, Blocks.cobblestone, Items.iron_ingot, Items.diamond, Items.gold_ingot}, {Items.wooden_pickaxe, Items.stone_pickaxe, Items.iron_pickaxe, Items.diamond_pickaxe, Items.golden_pickaxe}, {Items.wooden_shovel, Items.stone_shovel, Items.iron_shovel, Items.diamond_shovel, Items.golden_shovel}, {Items.wooden_axe, Items.stone_axe, Items.iron_axe, Items.diamond_axe, Items.golden_axe}, {Items.wooden_hoe, Items.stone_hoe, Items.iron_hoe, Items.diamond_hoe, Items.golden_hoe}};
|
| 12 |
|
| 13 | /**
|
| 14 | * Adds the tool recipes to the CraftingManager.
|
| 15 | */
|
| 16 | public void addRecipes(CraftingManager p_77586_1_)
|
| 17 | {
|
| 18 | for (int i = 0; i < this.recipeItems[0].length; ++i)
|
| 19 | {
|
| 20 | Object object = this.recipeItems[0][i];
|
| 21 |
|
| 22 | for (int j = 0; j < this.recipeItems.length - 1; ++j)
|
| 23 | {
|
| 24 | Item item = (Item)this.recipeItems[j + 1][i];
|
| 25 | p_77586_1_.addRecipe(new ItemStack(item), new Object[] {this.recipePatterns[j], '#', Items.stick, 'X', object});
|
| 26 | }
|
| 27 | }
|
| 28 |
|
| 29 | p_77586_1_.addRecipe(new ItemStack(Items.shears), new Object[] {" #", "# ", '#', Items.iron_ingot});
|
| 30 | }
|
| 31 | }
|
| 32 |
|