RecipesWeapons .java

net.minecraft.item.crafting.RecipesWeapons (class, 33 lines): members: recipePatterns, recipeItems, addRecipes. imports: Items.

net.minecraft.item.craftingclass33 linescommon1.3 KB

API Surface (1)

void addRecipes(CraftingManager p_77583_1_)

Fields & Constants (2)

recipePatterns
recipeItems

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

RecipesWeapons.java33 lines · MCP 1.8.9 · verbatimOriginal ↗
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 RecipesWeapons
9
{
10
    private String[][] recipePatterns = new String[][] {{"X", "X", "#"}};
11
    private Object[][] recipeItems = new Object[][] {{Blocks.planks, Blocks.cobblestone, Items.iron_ingot, Items.diamond, Items.gold_ingot}, {Items.wooden_sword, Items.stone_sword, Items.iron_sword, Items.diamond_sword, Items.golden_sword}};
12
13
    /**
14
     * Adds the weapon recipes to the CraftingManager.
15
     */
16
    public void addRecipes(CraftingManager p_77583_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_77583_1_.addRecipe(new ItemStack(item), new Object[] {this.recipePatterns[j], '#', Items.stick, 'X', object});
26
            }
27
        }
28
29
        p_77583_1_.addRecipe(new ItemStack(Items.bow, 1), new Object[] {" #X", "# X", " #X", 'X', Items.string, '#', Items.stick});
30
        p_77583_1_.addRecipe(new ItemStack(Items.arrow, 4), new Object[] {"X", "#", "Y", 'Y', Items.feather, 'X', Items.flint, '#', Items.stick});
31
    }
32
}
33

Deobfuscated MCP 1.8.9 source of RecipesWeapons from Marcelektro/MavenMCP-1.8.9 (net/minecraft/item/crafting/RecipesWeapons.java), stored verbatim.