MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / init

Method init

common/buildcraft/core/BCCoreRecipes.java:26–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25public class BCCoreRecipes {
26 public static void init() {
27 if (BCItems.CORE_WRENCH != null) {
28 ItemStack out = new ItemStack(BCItems.CORE_WRENCH);
29 Object[] in = { "I I", " G ", " I ", 'I', "ingotIron", 'G', "gearStone" };
30 GameRegistry.addRecipe(new ShapedOreRecipe(out, in));
31 }
32
33 if (BCItems.CORE_DIAMOND_SHARD != null) {
34 ItemStack out = new ItemStack(BCItems.CORE_DIAMOND_SHARD, 4);
35 Object[] in = { "D", 'D', Items.DIAMOND };
36 GameRegistry.addRecipe(new ShapedOreRecipe(out, in));
37 }
38
39 if (BCBlocks.CORE_MARKER_VOLUME != null) {
40 ItemStack out = new ItemStack(BCBlocks.CORE_MARKER_VOLUME);
41 ItemStack lapisLazuli = new ItemStack(Items.DYE, 1, EnumDyeColor.BLUE.getDyeDamage());
42 Object[] in = { "l", "t", 'l', lapisLazuli, 't', Blocks.REDSTONE_TORCH };
43 GameRegistry.addRecipe(new ShapedOreRecipe(out, in));
44 }
45
46 if (BCBlocks.CORE_MARKER_PATH != null) {
47 ItemStack out = new ItemStack(BCBlocks.CORE_MARKER_PATH);
48 ItemStack cactusGreen = new ItemStack(Items.DYE, 1, EnumDyeColor.GREEN.getDyeDamage());
49 Object[] in = { "g", "t", 'g', cactusGreen, 't', Blocks.REDSTONE_TORCH };
50 GameRegistry.addRecipe(new ShapedOreRecipe(out, in));
51 }
52
53 if (BCItems.CORE_MARKER_CONNECTOR != null) {
54 ItemStack out = new ItemStack(BCItems.CORE_MARKER_CONNECTOR);
55 Item wrench;
56 if (BCItems.CORE_WRENCH != null) wrench = BCItems.CORE_WRENCH;
57 else wrench = Items.IRON_INGOT;
58
59 Item gear;
60 if (BCItems.CORE_GEAR_WOOD != null) gear = BCItems.CORE_GEAR_WOOD;
61 else gear = Items.STICK;
62
63 Object[] in = { "r", "g", "w", 'r', Blocks.REDSTONE_TORCH, 'g', gear, 'w', wrench };
64 GameRegistry.addRecipe(new ShapedOreRecipe(out, in));
65 }
66
67 if (BCItems.CORE_PAINTBRUSH != null) {
68 ItemStack cleanPaintbrush = new ItemStack(BCItems.CORE_PAINTBRUSH);
69 Object[] input = { " iw", " gi", "s ", 's', "stickWood", 'g', "gearWood", 'w', new ItemStack(Blocks.WOOL, 1, 0), 'i', Items.STRING };
70 GameRegistry.addRecipe(new ShapedOreRecipe(cleanPaintbrush, input));
71
72 for (EnumDyeColor colour : EnumDyeColor.values()) {
73 ItemPaintbrush_BC8.Brush brush = BCCoreItems.paintbrush.new Brush(colour);
74 ItemStack out = brush.save();
75 GameRegistry.addRecipe(new ShapelessOreRecipe(out, cleanPaintbrush, ColourUtil.getDyeName(colour)));
76 }
77 }
78
79 String[] gears = { "wood", "stone", "iron", "gold", "diamond" };
80 Object[] outers = { "stickWood", "cobblestone", "ingotIron", "ingotGold", "gemDiamond" };
81 for (int i = 0; i < gears.length; i++) {
82 String key = gears[i];
83 Item gear = TagManager.getItem("item.gear." + key);

Callers 1

initMethod · 0.95

Calls 5

saveMethod · 0.95
getDyeNameMethod · 0.95
getItemMethod · 0.95
getTagMethod · 0.95
addRecipeMethod · 0.45

Tested by

no test coverage detected