コード例 #1
0
 public static void initBlocks() {
   blockMultiblock = new BlockMultiblock();
   GameRegistry.registerBlock(blockMultiblock, "multiblock");
   GameRegistry.registerTileEntity(TileMultiblock.class, "RPMulti");
   blockAppliance = new BlockAppliance();
   GameRegistry.registerBlock(blockAppliance, ItemExtended.class, "appliance");
   GameRegistry.registerTileEntity(TileAlloyFurnace.class, "RPAFurnace");
   blockAppliance.addTileEntityMapping(0, TileAlloyFurnace.class);
   blockAppliance.setBlockName(0, "rpafurnace");
   GameRegistry.addRecipe(
       new ItemStack(blockAppliance, 1, 0),
       new Object[] {"BBB", "B B", "BBB", Character.valueOf('B'), Blocks.brick_block});
   GameRegistry.registerTileEntity(TileAdvBench.class, "RPAdvBench");
   blockAppliance.addTileEntityMapping(3, TileAdvBench.class);
   blockAppliance.setBlockName(3, "rpabench");
   CraftLib.addOreRecipe(
       new ItemStack(blockAppliance, 1, 3),
       new Object[] {
         "SSS",
         "WTW",
         "WCW",
         Character.valueOf('S'),
         Blocks.stone,
         Character.valueOf('W'),
         "plankWood",
         Character.valueOf('T'),
         Blocks.crafting_table,
         Character.valueOf('C'),
         Blocks.chest
       });
   itemHandsawIron = new ItemHandsaw(0);
   itemHandsawIron.setUnlocalizedName("handsawIron");
   itemHandsawIron.setTextureName("rpworld:itemHandsawIron");
   itemHandsawIron.setMaxDamage(320);
   itemHandsawDiamond = new ItemHandsaw(2);
   itemHandsawDiamond.setUnlocalizedName("handsawDiamond");
   itemHandsawDiamond.setTextureName("rpworld:itemHandsawDiamond");
   itemHandsawDiamond.setMaxDamage(1280);
   GameRegistry.addRecipe(
       new ItemStack(itemHandsawIron, 1),
       new Object[] {
         "WWW",
         " II",
         " II",
         Character.valueOf('I'),
         Items.iron_ingot,
         Character.valueOf('W'),
         Items.stick
       });
   GameRegistry.addRecipe(
       new ItemStack(itemHandsawDiamond, 1),
       new Object[] {
         "WWW",
         " II",
         " DD",
         Character.valueOf('I'),
         Items.iron_ingot,
         Character.valueOf('D'),
         Items.diamond,
         Character.valueOf('W'),
         Items.stick
       });
   GameRegistry.addShapelessRecipe(
       CoreLib.copyStack(itemWaferSilicon, 16),
       new Object[] {itemBouleSilicon, new ItemStack(itemHandsawDiamond, 1, -1)});
   itemScrewdriver = new ItemScrewdriver();
   GameRegistry.addRecipe(
       new ItemStack(itemScrewdriver, 1),
       new Object[] {
         "I ", " W", Character.valueOf('I'), Items.iron_ingot, Character.valueOf('W'), Items.stick
       });
   GameRegistry.registerItem(itemScrewdriver, "screwdriver");
   GameRegistry.addRecipe(
       new ItemStack(itemDrawplateDiamond, 1),
       new Object[] {
         " I ",
         "IDI",
         " I ",
         Character.valueOf('I'),
         new ItemStack(blockMicro, 1, 5649),
         Character.valueOf('D'),
         new ItemStack(blockMicro, 1, 4115)
       });
   GameRegistry.addShapelessRecipe(
       itemFineIron, new Object[] {Items.iron_ingot, new ItemStack(itemDrawplateDiamond, 1, -1)});
   CraftLib.addShapelessOreRecipe(
       itemFineCopper, new Object[] {"ingotCopper", new ItemStack(itemDrawplateDiamond, 1, -1)});
   GameRegistry.addRecipe(
       CoreLib.copyStack(itemNuggetIron, 9),
       new Object[] {"I", Character.valueOf('I'), Items.iron_ingot});
   CraftLib.addOreRecipe(
       CoreLib.copyStack(itemNuggetCopper, 9),
       new Object[] {"I", Character.valueOf('I'), "ingotCopper"});
   CraftLib.addOreRecipe(
       CoreLib.copyStack(itemNuggetTin, 9),
       new Object[] {"I", Character.valueOf('I'), "ingotTin"});
   CraftLib.addOreRecipe(
       CoreLib.copyStack(itemNuggetSilver, 9),
       new Object[] {"I", Character.valueOf('I'), "ingotSilver"});
   GameRegistry.addRecipe(
       new ItemStack(Items.iron_ingot, 1, 0),
       new Object[] {"III", "III", "III", Character.valueOf('I'), itemNuggetIron});
   GameRegistry.addRecipe(
       itemIngotSilver,
       new Object[] {"III", "III", "III", Character.valueOf('I'), itemNuggetSilver});
   GameRegistry.addRecipe(
       itemIngotTin, new Object[] {"III", "III", "III", Character.valueOf('I'), itemNuggetTin});
   GameRegistry.addRecipe(
       itemIngotCopper,
       new Object[] {"III", "III", "III", Character.valueOf('I'), itemNuggetCopper});
   GameRegistry.addRecipe(
       itemCanvas,
       new Object[] {
         "SSS",
         "SWS",
         "SSS",
         Character.valueOf('S'),
         Items.string,
         Character.valueOf('W'),
         Items.stick
       });
   GameRegistry.addRecipe(
       new ItemStack(Items.diamond, 2),
       new Object[] {"D", Character.valueOf('D'), new ItemStack(blockMicro, 1, 4115)});
   GameRegistry.addRecipe(
       new ItemStack(Items.diamond, 1),
       new Object[] {"D", Character.valueOf('D'), new ItemStack(blockMicro, 1, 19)});
   GameRegistry.addRecipe(
       new ItemStack(Items.iron_ingot, 2),
       new Object[] {"I", Character.valueOf('I'), new ItemStack(blockMicro, 1, 4113)});
   GameRegistry.addRecipe(
       new ItemStack(Items.iron_ingot, 1),
       new Object[] {"I", Character.valueOf('I'), new ItemStack(blockMicro, 1, 17)});
 }
コード例 #2
0
 public static void initAlloys() {
   CraftLib.addAlloyResult(
       itemIngotRed,
       new Object[] {new ItemStack(Items.redstone, 4), new ItemStack(Items.iron_ingot, 1)});
   CraftLib.addAlloyResult(
       itemIngotRed, new Object[] {new ItemStack(Items.redstone, 4), new OreStack("ingotCopper")});
   CraftLib.addAlloyResult(
       CoreLib.copyStack(itemIngotBrass, 4),
       new Object[] {new OreStack("ingotTin"), new OreStack("ingotCopper", 3)});
   CraftLib.addAlloyResult(
       CoreLib.copyStack(itemTinplate, 4),
       new Object[] {new OreStack("ingotTin"), new ItemStack(Items.iron_ingot, 2)});
   CraftLib.addAlloyResult(
       itemIngotBlue, new Object[] {new OreStack("ingotSilver"), new OreStack("dustNikolite", 4)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 3), new Object[] {new ItemStack(Blocks.rail, 8)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 3), new Object[] {new ItemStack(Items.bucket, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 5), new Object[] {new ItemStack(Items.minecart, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 6), new Object[] {new ItemStack(Items.iron_door, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 3), new Object[] {new ItemStack(Blocks.iron_bars, 8)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 31), new Object[] {new ItemStack(Blocks.anvil, 1, 0)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 31), new Object[] {new ItemStack(Blocks.anvil, 1, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 31), new Object[] {new ItemStack(Blocks.anvil, 1, 2)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 2), new Object[] {new ItemStack(Items.iron_sword, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 3), new Object[] {new ItemStack(Items.iron_pickaxe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 3), new Object[] {new ItemStack(Items.iron_axe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 1), new Object[] {new ItemStack(Items.iron_shovel, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 2), new Object[] {new ItemStack(Items.iron_hoe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 2), new Object[] {new ItemStack(Items.golden_sword, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 3), new Object[] {new ItemStack(Items.golden_pickaxe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 3), new Object[] {new ItemStack(Items.golden_axe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 1), new Object[] {new ItemStack(Items.golden_shovel, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 2), new Object[] {new ItemStack(Items.golden_hoe, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 5), new Object[] {new ItemStack(Items.iron_helmet, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 8), new Object[] {new ItemStack(Items.iron_chestplate, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 7), new Object[] {new ItemStack(Items.iron_leggings, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 4), new Object[] {new ItemStack(Items.iron_boots, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 5), new Object[] {new ItemStack(Items.golden_helmet, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 8),
       new Object[] {new ItemStack(Items.golden_chestplate, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 7), new Object[] {new ItemStack(Items.golden_leggings, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 4), new Object[] {new ItemStack(Items.golden_boots, 1)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.gold_ingot, 1), new Object[] {new ItemStack(Items.gold_nugget, 9)});
   CraftLib.addAlloyResult(
       new ItemStack(Items.iron_ingot, 1), new Object[] {CoreLib.copyStack(itemNuggetIron, 9)});
   CraftLib.addAlloyResult(itemIngotSilver, new Object[] {CoreLib.copyStack(itemNuggetSilver, 9)});
   CraftLib.addAlloyResult(itemIngotCopper, new Object[] {CoreLib.copyStack(itemNuggetCopper, 9)});
   CraftLib.addAlloyResult(itemIngotTin, new Object[] {CoreLib.copyStack(itemNuggetTin, 9)});
   CraftLib.addAlloyResult(itemIngotCopper, new Object[] {itemFineCopper});
   CraftLib.addAlloyResult(new ItemStack(Items.iron_ingot, 1), new Object[] {itemFineIron});
   CraftLib.addAlloyResult(
       itemBouleSilicon,
       new Object[] {new ItemStack(Items.coal, 8, 0), new ItemStack(Blocks.sand, 8)});
   CraftLib.addAlloyResult(
       itemBouleSilicon,
       new Object[] {new ItemStack(Items.coal, 8, 1), new ItemStack(Blocks.sand, 8)});
   CraftLib.addAlloyResult(
       itemWaferBlue,
       new Object[] {CoreLib.copyStack(itemWaferSilicon, 1), new OreStack("dustNikolite", 4)});
   CraftLib.addAlloyResult(
       itemWaferRed,
       new Object[] {CoreLib.copyStack(itemWaferSilicon, 1), new ItemStack(Items.redstone, 4)});
 }