Пример #1
0
  public BlockLoader() {
    registerBlock(drinks_store);
    registerBlock(drinks_brewer);
    registerBlock(rain_collector);

    GameRegistry.registerTileEntity(TileEntityDS.class, drinks_store.getLocalizedName());
    GameRegistry.registerTileEntity(TileEntityDB.class, drinks_brewer.getUnlocalizedName());
    GameRegistry.registerTileEntity(TileEntityRC.class, rain_collector.getUnlocalizedName());

    GameRegistry.addRecipe(
        new ItemStack(drinks_store),
        new Object[] {
          "***", "*#*", "*^*", '*', Items.quartz, '#', Blocks.glass_pane, '^', Blocks.piston
        });

    GameRegistry.addRecipe(
        new ItemStack(drinks_brewer, 1),
        new Object[] {
          "***", "*#*", "***", '*', Blocks.cobblestone, '#', Items.glass_bottle,
        });

    GameRegistry.addRecipe(
        new ItemStack(rain_collector, 1),
        new Object[] {
          "***", "*#*", "***", '*', Blocks.cobblestone, '#', Items.bucket,
        });
  }
Пример #2
0
  public static void init() {
    GameRegistry.addRecipe(
        new ItemStack(ModItems.findingRod), "A A", " A ", "A A", 'A', Blocks.COBBLESTONE);

    GameRegistry.addRecipe(
        new ItemStack(Items.ARROW), "A A", " A ", "A  ", 'A', Blocks.COBBLESTONE);
  }
Пример #3
0
  public static void armorCraft(
      Item item, Item armorHelmet, Item armorChestplate, Item armorLeggings, Item armorBoots) {

    GameRegistry.addRecipe(new ItemStack(armorHelmet), new Object[] {"###", "# #", '#', item});
    GameRegistry.addRecipe(
        new ItemStack(armorChestplate), new Object[] {"# #", "###", "###", '#', item});
    GameRegistry.addRecipe(
        new ItemStack(armorLeggings), new Object[] {"###", "# #", "# #", '#', item});
    GameRegistry.addRecipe(new ItemStack(armorBoots), new Object[] {"# #", "# #", '#', item});
  }
 /**
  * Gives achievements/adds crafting recipes once certain blockcrafting objectives are completed
  *
  * @param e
  */
 @SubscribeEvent
 public void onBlockCrafted(PlayerEvent.ItemCraftedEvent e) {
   if (e.crafting.getItem().equals(Item.getItemFromBlock(ReimaginedBlocks.woodenStructure))) {
     e.player.addStat(AchievementLists.Achievement_woodenStructure, 1);
     GameRegistry.addRecipe(
         new ItemStack(ReimaginedBlocks.smoothStructure, 1),
         "CBC",
         "ASA",
         "CBC",
         'B',
         Blocks.stone,
         'A',
         Blocks.cobblestone,
         'C',
         Blocks.stone_slab,
         'S',
         ReimaginedItems.stickySubstance);
   } else if (e.crafting
       .getItem()
       .equals(Item.getItemFromBlock(ReimaginedBlocks.smoothStructure))) {
     e.player.addStat(AchievementLists.Achievement_smoothStructure, 1);
     GameRegistry.addRecipe(
         new ItemStack(ReimaginedBlocks.netherStructure, 1),
         "CBC",
         "ASA",
         "CBC",
         'B',
         Blocks.netherrack,
         'A',
         Blocks.nether_brick_fence,
         'C',
         Blocks.nether_brick,
         'S',
         ReimaginedItems.superGlue);
   } else if (e.crafting
       .getItem()
       .equals(Item.getItemFromBlock(ReimaginedBlocks.netherStructure))) {
     e.player.addStat(AchievementLists.Achievement_netherStructure, 1);
   } else if (e.crafting
       .getItem()
       .equals(Item.getItemFromBlock(ReimaginedBlocks.reinforcedStructure))) {
     e.player.addStat(AchievementLists.Achievement_reinforcedStructure, 1);
   } else if (e.crafting.getItem().equals(Item.getItemFromBlock(ReimaginedBlocks.basicGearbox))) {
     e.player.addStat(AchievementLists.Achievement_basicGearbox, 1);
   } else if (e.crafting
       .getItem()
       .equals(Item.getItemFromBlock(ReimaginedBlocks.advancedGearbox))) {
     e.player.addStat(AchievementLists.Achievement_advancedGearbox, 1);
   } else if (e.crafting
       .getItem()
       .equals(Item.getItemFromBlock(ReimaginedBlocks.reinforcedGearbox))) {
     e.player.addStat(AchievementLists.Achievement_reinforcedGearbox, 1);
   }
 }
Пример #5
0
  public static void oreCompressedCraft(Item item, Block block, Block ore, float exp) {

    if (ore != null) GameRegistry.addSmelting(ore, new ItemStack(item), exp);

    GameRegistry.addRecipe(new ItemStack(block), new Object[] {"###", "###", "###", '#', item});
    GameRegistry.addShapelessRecipe(new ItemStack(item, 9), new Object[] {block});
  }
Пример #6
0
 @Override
 public void fire(FMLInitializationEvent e) {
   if (e.getSide() == Side.CLIENT) this.registerRender();
   if (this.recipe != null) {
     if (this.isShapeless) GameRegistry.addShapelessRecipe(new ItemStack(this), this.recipe);
     else GameRegistry.addRecipe(new ItemStack(this), this.recipe);
   }
 }
  /** Add all valid block recipes */
  public static void addRecipes() {

    // Everything Block Recipes
    GameRegistry.addRecipe(new EverythingBlockCraftingRecipes());
    GameRegistry.addRecipe(new EverythingBlockDecraftingRecipes());
    GameRegistry.addRecipe(new EverythingSlabCraftingRecipes());
    GameRegistry.addRecipe(new EverythingStairCraftingRecipes());
    GameRegistry.addRecipe(new EverythingStairDecraftingRecipes());
    GameRegistry.addRecipe(new EverythingWallCraftingRecipes());
    GameRegistry.addRecipe(new EverythingWallDecraftingRecipes());
    RecipeSorter.register(
        RefStrings.MODID + ":EBCrafting",
        EverythingBlockCraftingRecipes.class,
        Category.SHAPED,
        "after:minecraft:shaped");
    RecipeSorter.register(
        RefStrings.MODID + ":EBDecrafting",
        EverythingBlockDecraftingRecipes.class,
        Category.SHAPELESS,
        "after:minecraft:shapeless");
    RecipeSorter.register(
        RefStrings.MODID + ":EBSlabCrafting",
        EverythingSlabCraftingRecipes.class,
        Category.SHAPED,
        "after:minecraft:shaped");
    RecipeSorter.register(
        RefStrings.MODID + ":EBStairCrafting",
        EverythingStairCraftingRecipes.class,
        Category.SHAPED,
        "after:minecraft:shaped");
    RecipeSorter.register(
        RefStrings.MODID + ":EBStairDecrafting",
        EverythingStairDecraftingRecipes.class,
        Category.SHAPELESS,
        "after:minecraft:shapeless");
    RecipeSorter.register(
        RefStrings.MODID + ":EBWallCrafting",
        EverythingWallCraftingRecipes.class,
        Category.SHAPED,
        "after:minecraft:shaped");
    RecipeSorter.register(
        RefStrings.MODID + ":EBWallDecrafting",
        EverythingWallDecraftingRecipes.class,
        Category.SHAPELESS,
        "after:minecraft:shapeless");

    // direct the API to these recipes
    EverythingBlocksAPI.craftingRecipes = new EverythingBlockCraftingRecipes();
    EverythingBlocksAPI.decraftingRecipes = new EverythingBlockDecraftingRecipes();
    EverythingBlocksAPI.craftingRecipesSlabs = new EverythingSlabCraftingRecipes();
    EverythingBlocksAPI.craftingRecipesStairs = new EverythingStairCraftingRecipes();
    EverythingBlocksAPI.decraftingRecipesStairs = new EverythingStairDecraftingRecipes();
    EverythingBlocksAPI.craftingRecipesWalls = new EverythingStairCraftingRecipes();
    EverythingBlocksAPI.decraftingRecipesWalls = new EverythingStairDecraftingRecipes();
  }
 public static void addRecipe(
     ItemFoodAppleMagic apple, ItemStack ingredient, boolean isExpensive) {
   int refund = 8;
   if (isExpensive) {
     GameRegistry.addRecipe(
         new ItemStack(apple), "lll", "lal", "lll", 'l', ingredient, 'a', Items.APPLE);
   } else {
     GameRegistry.addShapelessRecipe(new ItemStack(apple), ingredient, Items.APPLE);
     refund = 1;
   }
   GameRegistry.addSmelting(
       apple, new ItemStack(ingredient.getItem(), refund, ingredient.getMetadata()), smeltexp);
 }
Пример #9
0
  public static void makeRecipes() {

    // 2 items shapeless is 1 block

    GameRegistry.addShapelessRecipe(
        new ItemStack(MyBlocks.block_light), MyItems.item_ring, MyItems.item_ring);

    // 4 items in pattern results in 3 blocks
    GameRegistry.addRecipe(
        new ItemStack(MyBlocks.block_light, 3), "## ", " ##", '#', MyItems.item_ring);

    // Lapiz in furnace = item_ring
    // last argument is XP, iron (0.7), gold/diamond/em ore (1) beef/meat (0.35)
    GameRegistry.addSmelting(
        new ItemStack(Items.dye, 1, 4), new ItemStack(MyItems.item_ring), 0.5f);
  }
Пример #10
0
 protected void addNormalRecipe() {
   ShapedOreRecipe recipe =
       new ShapedOreRecipe(
           new ItemStack(this),
           new Object[] {
             "dgd",
             "gng",
             "dgd",
             'd',
             PAItems.diamondUpgrade,
             'g',
             Items.GOLD_INGOT,
             'n',
             Items.NETHER_STAR
           });
   GameRegistry.addRecipe(recipe);
 }
Пример #11
0
  public void registerRecipe() {

    if (this.color == "Red") {

      // Recipe for creating a redLightSaber.
      ItemStack redPowerCrystalStack = new ItemStack(SuperDopeJediMod.redPowerCrystal);
      ItemStack ironIngotStack = new ItemStack(Items.iron_ingot);
      ItemStack stoneButtonStack = new ItemStack(Blocks.stone_button);
      GameRegistry.addRecipe(
          new ItemStack(this),
          "x",
          "y",
          "z",
          'x',
          redPowerCrystalStack,
          'y',
          stoneButtonStack,
          'z',
          ironIngotStack);
    }

    if (this.color == "Blue") {

      // Recipe for creating a blueLightSaber.
      ItemStack bluePowerCrystalStack = new ItemStack(SuperDopeJediMod.bluePowerCrystal);
      ItemStack ironIngotStack = new ItemStack(Items.iron_ingot);
      ItemStack stoneButtonStack = new ItemStack(Blocks.stone_button);
      GameRegistry.addRecipe(
          new ItemStack(this),
          "x",
          "y",
          "z",
          'x',
          bluePowerCrystalStack,
          'y',
          stoneButtonStack,
          'z',
          ironIngotStack);
    }

    if (this.color == "Green") {

      // Recipe for creating a greenLightSaber.
      ItemStack greenPowerCrystalStack = new ItemStack(SuperDopeJediMod.greenPowerCrystal);
      ItemStack ironIngotStack = new ItemStack(Items.iron_ingot);
      ItemStack stoneButtonStack = new ItemStack(Blocks.stone_button);
      GameRegistry.addRecipe(
          new ItemStack(this),
          "x",
          "y",
          "z",
          'x',
          greenPowerCrystalStack,
          'y',
          stoneButtonStack,
          'z',
          ironIngotStack);
    }

    if (this.color == "Purple") {

      // Recipe for creating a purpleLightSaber.
      ItemStack purplePowerCrystalStack = new ItemStack(SuperDopeJediMod.purplePowerCrystal);
      ItemStack ironIngotStack = new ItemStack(Items.iron_ingot);
      ItemStack stoneButtonStack = new ItemStack(Blocks.stone_button);
      GameRegistry.addRecipe(
          new ItemStack(this),
          "x",
          "y",
          "z",
          'x',
          purplePowerCrystalStack,
          'y',
          stoneButtonStack,
          'z',
          ironIngotStack);
    }
  }
Пример #12
0
 public static void warAxeCraft(Block block, Item warAxe) {
   GameRegistry.addRecipe(
       new ItemStack(warAxe), new Object[] {"###", "#P#", " P ", 'P', Items.STICK, '#', block});
 }
Пример #13
0
 public static void swordCraft(Item item, Item sword) {
   GameRegistry.addRecipe(
       new ItemStack(sword), new Object[] {" # ", " # ", " P ", 'P', Items.STICK, '#', item});
 }
Пример #14
0
 public static void hoeCraft(Item item, Item hoe) {
   GameRegistry.addRecipe(
       new ItemStack(hoe), new Object[] {"## ", " P ", " P ", 'P', Items.STICK, '#', item});
 }
Пример #15
0
 public ItemPhantomInk() {
   super(LibItemNames.PHANTOM_INK);
   GameRegistry.addRecipe(new PhantomInkRecipe());
   RecipeSorter.register("botania:phantomInk", PhantomInkRecipe.class, Category.SHAPELESS, "");
 }
Пример #16
0
  public static void registerVanillaCraftingRecipes() {
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.chitinHelm), "AAA", "A A", 'A', GlobalAdditions.chitin);
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.chitinChest),
        "A A",
        "AAA",
        "AAA",
        'A',
        GlobalAdditions.chitin);
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.chitinLegs),
        "AAA",
        "A A",
        "A A",
        'A',
        GlobalAdditions.chitin);
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.chitinBoots),
        "   ",
        "A A",
        "A A",
        'A',
        GlobalAdditions.chitin);
    // Iron Pike
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.ironPike),
        "  A",
        " B ",
        "B  ",
        'A',
        Items.iron_ingot,
        'B',
        Items.stick);

    // Stone Spear
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.stoneSpear),
        "  A",
        " B ",
        "B  ",
        'A',
        Blocks.stone,
        'B',
        Items.stick);

    // Cobble Ball
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.cobble_ball, 4),
        " B ",
        "BAB",
        " B ",
        'B',
        Blocks.stone,
        'A',
        Blocks.cobblestone);

    // Slingshot
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.slingshot),
        "ACA",
        "B B",
        " B ",
        'A',
        GlobalAdditions.fiber,
        'B',
        Items.stick,
        'C',
        Items.leather);

    // Motar and Pestle
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.pestle),
        "   ",
        "ABA",
        " A ",
        'A',
        Blocks.stone,
        'B',
        Blocks.cobblestone);

    // Smithy
    GameRegistry.addRecipe(
        new ItemStack(GlobalAdditions.smithy),
        "AAA",
        "B B",
        "B B",
        'A',
        Blocks.iron_block,
        'B',
        Blocks.planks);

    // Tranc Arrow
    GameRegistry.addShapelessRecipe(
        new ItemStack(GlobalAdditions.tranq_arrow), GlobalAdditions.narcotics, Items.arrow);

    // Pistol
    // GameRegistry.addRecipe(new ItemStack(GlobalAdditions.),
    //		"AAA",
    //		"A  ",
    //		"   ",
    //		'A', Items.iron_ingot);

    // Ammo
    // GameRegistry.addShapelessRecipe(new ItemStack(GlobalAdditions. ,3), Items.gunpowder,
    // Items.iron_ingot);

    /*
    GameRegistry.addShapelessRecipe(new ItemStack(GlobalAdditions.narcotics, 1), new ItemStack(Items.bowl), new ItemStack(GlobalAdditions.narcoBerry), new ItemStack(GlobalAdditions.fiber,1));
    GameRegistry.addRecipe(new ItemStack(GlobalAdditions.stoneSpear), "B  ", " A ", "  A", 'A', new ItemStack(Items.stick), 'B', new ItemStack(Blocks.stone));
    GameRegistry.addRecipe(new ItemStack(GlobalAdditions.ironPike), "B  ", " A ", "  A", 'A', new ItemStack(Items.stick), 'B', new ItemStack(Items.iron_ingot));
    GameRegistry.addRecipe(new ItemStack(GlobalAdditions.cobble_ball), "BB ", "BB ", 'B', new ItemStack(Blocks.cobblestone));
    */
    //			GameRegistry.addShapelessRecipe(new ItemStack(GlobalAdditions.saddle_small, 1),
    // Items.leather, Items.iron_ingot,
    //					GlobalAdditions.fiber, GlobalAdditions.fiber, GlobalAdditions.fiber,
    // GlobalAdditions.fiber, GlobalAdditions.fiber);
  }
Пример #17
0
 @Override
 public void init() {
   GameRegistry.addRecipe(
       new ItemStack(this, 1),
       new Object[] {"##", "#I", " I", '#', ExpBlocks.blockCarbon, 'I', Items.stick});
 }