2015-08-29 14:33:25 +02:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("ToolCrafting.java") is part of the Actually Additions mod for Minecraft.
|
2015-08-29 14:33:25 +02:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-08-29 14:33:25 +02:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:52:27 +02:00
|
|
|
* © 2015-2016 Ellpeck Ellpeck
|
2015-08-29 14:33:25 +02:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.crafting;
|
2015-03-07 02:23:31 +01:00
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
2016-03-18 18:41:37 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
|
2015-03-07 02:23:31 +01:00
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
import net.minecraft.init.Items;
|
2015-12-31 15:05:27 +01:00
|
|
|
import net.minecraft.item.Item;
|
2015-03-07 02:23:31 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2015-09-10 21:25:34 +02:00
|
|
|
import net.minecraft.item.crafting.IRecipe;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
2015-04-04 05:20:19 +02:00
|
|
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
2015-07-01 16:32:21 +02:00
|
|
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
2015-03-07 02:23:31 +01:00
|
|
|
|
2015-09-10 21:25:34 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
2015-03-07 02:23:31 +01:00
|
|
|
public class ToolCrafting{
|
|
|
|
|
2015-09-10 21:25:34 +02:00
|
|
|
public static ArrayList<IRecipe> recipesPaxels = new ArrayList<IRecipe>();
|
|
|
|
|
2015-03-07 02:23:31 +01:00
|
|
|
public static void init(){
|
|
|
|
|
2015-04-24 19:22:03 +02:00
|
|
|
if(ConfigCrafting.TOOL_EMERALD.isEnabled()){
|
2016-04-20 21:39:03 +02:00
|
|
|
addToolAndArmorRecipes(new ItemStack(Items.EMERALD), InitItems.itemPickaxeEmerald, InitItems.itemSwordEmerald, InitItems.itemAxeEmerald, InitItems.itemShovelEmerald, InitItems.itemHoeEmerald, InitItems.itemHelmEmerald, InitItems.itemChestEmerald, InitItems.itemPantsEmerald, InitItems.itemBootsEmerald);
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|
|
|
|
|
2015-08-02 07:18:27 +02:00
|
|
|
if(ConfigCrafting.TOOL_QUARTZ.isEnabled()){
|
2015-12-31 15:05:27 +01:00
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), InitItems.itemPickaxeQuartz, InitItems.itemSwordQuartz, InitItems.itemAxeQuartz, InitItems.itemShovelQuartz, InitItems.itemHoeQuartz, InitItems.itemHelmQuartz, InitItems.itemChestQuartz, InitItems.itemPantsQuartz, InitItems.itemBootsQuartz);
|
2015-08-02 07:18:27 +02:00
|
|
|
}
|
|
|
|
|
2015-04-24 19:22:03 +02:00
|
|
|
if(ConfigCrafting.TOOL_OBSIDIAN.isEnabled()){
|
2016-04-20 21:39:03 +02:00
|
|
|
addToolAndArmorRecipes(new ItemStack(Blocks.OBSIDIAN), InitItems.itemPickaxeObsidian, InitItems.itemSwordObsidian, InitItems.itemAxeObsidian, InitItems.itemShovelObsidian, InitItems.itemHoeObsidian, InitItems.itemHelmObsidian, InitItems.itemChestObsidian, InitItems.itemPantsObsidian, InitItems.itemBootsObsidian);
|
2015-12-31 15:05:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if(ConfigCrafting.TOOL_CRYSTALS.isEnabled()){
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), InitItems.itemPickaxeCrystalRed, InitItems.itemSwordCrystalRed, InitItems.itemAxeCrystalRed, InitItems.itemShovelCrystalRed, InitItems.itemHoeCrystalRed, InitItems.itemHelmCrystalRed, InitItems.itemChestCrystalRed, InitItems.itemPantsCrystalRed, InitItems.itemBootsCrystalRed);
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), InitItems.itemPickaxeCrystalGreen, InitItems.itemSwordCrystalGreen, InitItems.itemAxeCrystalGreen, InitItems.itemShovelCrystalGreen, InitItems.itemHoeCrystalGreen, InitItems.itemHelmCrystalGreen, InitItems.itemChestCrystalGreen, InitItems.itemPantsCrystalGreen, InitItems.itemBootsCrystalGreen);
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), InitItems.itemPickaxeCrystalWhite, InitItems.itemSwordCrystalWhite, InitItems.itemAxeCrystalWhite, InitItems.itemShovelCrystalWhite, InitItems.itemHoeCrystalWhite, InitItems.itemHelmCrystalWhite, InitItems.itemChestCrystalWhite, InitItems.itemPantsCrystalWhite, InitItems.itemBootsCrystalWhite);
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), InitItems.itemPickaxeCrystalLightBlue, InitItems.itemSwordCrystalLightBlue, InitItems.itemAxeCrystalLightBlue, InitItems.itemShovelCrystalLightBlue, InitItems.itemHoeCrystalLightBlue, InitItems.itemHelmCrystalLightBlue, InitItems.itemChestCrystalLightBlue, InitItems.itemPantsCrystalLightBlue, InitItems.itemBootsCrystalLightBlue);
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), InitItems.itemPickaxeCrystalBlue, InitItems.itemSwordCrystalBlue, InitItems.itemAxeCrystalBlue, InitItems.itemShovelCrystalBlue, InitItems.itemHoeCrystalBlue, InitItems.itemHelmCrystalBlue, InitItems.itemChestCrystalBlue, InitItems.itemPantsCrystalBlue, InitItems.itemBootsCrystalBlue);
|
|
|
|
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), InitItems.itemPickaxeCrystalBlack, InitItems.itemSwordCrystalBlack, InitItems.itemAxeCrystalBlack, InitItems.itemShovelCrystalBlack, InitItems.itemHoeCrystalBlack, InitItems.itemHelmCrystalBlack, InitItems.itemChestCrystalBlack, InitItems.itemPantsCrystalBlack, InitItems.itemBootsCrystalBlack);
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|
2015-07-01 16:32:21 +02:00
|
|
|
|
|
|
|
//Paxels
|
|
|
|
if(ConfigCrafting.PAXELS.isEnabled()){
|
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.woodenPaxel),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.WOODEN_AXE),
|
|
|
|
new ItemStack(Items.WOODEN_PICKAXE),
|
|
|
|
new ItemStack(Items.WOODEN_SHOVEL),
|
|
|
|
new ItemStack(Items.WOODEN_SWORD),
|
|
|
|
new ItemStack(Items.WOODEN_HOE)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.STONE_AXE),
|
|
|
|
new ItemStack(Items.STONE_PICKAXE),
|
|
|
|
new ItemStack(Items.STONE_SHOVEL),
|
|
|
|
new ItemStack(Items.STONE_SWORD),
|
|
|
|
new ItemStack(Items.STONE_HOE)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.IRON_AXE),
|
|
|
|
new ItemStack(Items.IRON_PICKAXE),
|
|
|
|
new ItemStack(Items.IRON_SHOVEL),
|
|
|
|
new ItemStack(Items.IRON_SWORD),
|
|
|
|
new ItemStack(Items.IRON_HOE)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.GOLDEN_AXE),
|
|
|
|
new ItemStack(Items.GOLDEN_PICKAXE),
|
|
|
|
new ItemStack(Items.GOLDEN_SHOVEL),
|
|
|
|
new ItemStack(Items.GOLDEN_SWORD),
|
|
|
|
new ItemStack(Items.GOLDEN_HOE)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel),
|
2016-04-20 21:39:03 +02:00
|
|
|
new ItemStack(Items.DIAMOND_AXE),
|
|
|
|
new ItemStack(Items.DIAMOND_PICKAXE),
|
|
|
|
new ItemStack(Items.DIAMOND_SHOVEL),
|
|
|
|
new ItemStack(Items.DIAMOND_SWORD),
|
|
|
|
new ItemStack(Items.DIAMOND_HOE)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel),
|
|
|
|
new ItemStack(InitItems.itemAxeEmerald),
|
|
|
|
new ItemStack(InitItems.itemPickaxeEmerald),
|
|
|
|
new ItemStack(InitItems.itemSwordEmerald),
|
|
|
|
new ItemStack(InitItems.itemShovelEmerald),
|
|
|
|
new ItemStack(InitItems.itemHoeEmerald)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel),
|
|
|
|
new ItemStack(InitItems.itemAxeObsidian),
|
|
|
|
new ItemStack(InitItems.itemPickaxeObsidian),
|
|
|
|
new ItemStack(InitItems.itemSwordObsidian),
|
|
|
|
new ItemStack(InitItems.itemShovelObsidian),
|
|
|
|
new ItemStack(InitItems.itemHoeObsidian)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-29 18:58:23 +02:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel),
|
|
|
|
new ItemStack(InitItems.itemAxeQuartz),
|
|
|
|
new ItemStack(InitItems.itemPickaxeQuartz),
|
|
|
|
new ItemStack(InitItems.itemSwordQuartz),
|
|
|
|
new ItemStack(InitItems.itemShovelQuartz),
|
|
|
|
new ItemStack(InitItems.itemHoeQuartz)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
|
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalRed),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalRed),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalRed),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalRed),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalRed),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalRed)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalGreen),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalGreen),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalGreen),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalGreen),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalGreen)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalBlue),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalBlue),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalBlue),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalBlue),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalBlue)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalLightBlue),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalLightBlue),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalLightBlue),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalLightBlue),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalLightBlue)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalBlack),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalBlack),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalBlack),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalBlack),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalBlack)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2016-01-01 23:44:22 +01:00
|
|
|
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite),
|
|
|
|
new ItemStack(InitItems.itemAxeCrystalWhite),
|
|
|
|
new ItemStack(InitItems.itemPickaxeCrystalWhite),
|
|
|
|
new ItemStack(InitItems.itemSwordCrystalWhite),
|
|
|
|
new ItemStack(InitItems.itemShovelCrystalWhite),
|
|
|
|
new ItemStack(InitItems.itemHoeCrystalWhite)));
|
2016-03-18 18:41:37 +01:00
|
|
|
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
2015-07-01 16:32:21 +02:00
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|
|
|
|
|
2015-12-31 15:05:27 +01:00
|
|
|
public static void addToolAndArmorRecipes(ItemStack base, Item pickaxe, Item sword, Item axe, Item shovel, Item hoe, Item helm, Item chest, Item pants, Item boots){
|
|
|
|
//Pickaxe
|
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(pickaxe),
|
|
|
|
"EEE", " S ", " S ",
|
|
|
|
'E', base,
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.STICK)));
|
2015-12-31 15:05:27 +01:00
|
|
|
|
|
|
|
//Sword
|
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(sword),
|
|
|
|
"E", "E", "S",
|
|
|
|
'E', base,
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.STICK)));
|
2015-12-31 15:05:27 +01:00
|
|
|
|
|
|
|
//Axe
|
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(axe),
|
|
|
|
"EE", "ES", " S",
|
|
|
|
'E', base,
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.STICK)));
|
2015-12-31 15:05:27 +01:00
|
|
|
|
|
|
|
//Shovel
|
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(shovel),
|
|
|
|
"E", "S", "S",
|
|
|
|
'E', base,
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.STICK)));
|
2015-12-31 15:05:27 +01:00
|
|
|
|
|
|
|
//Hoe
|
|
|
|
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(hoe),
|
|
|
|
"EE", " S", " S",
|
|
|
|
'E', base,
|
2016-04-20 21:39:03 +02:00
|
|
|
'S', new ItemStack(Items.STICK)));
|
2015-12-31 15:05:27 +01:00
|
|
|
|
|
|
|
//Helm
|
|
|
|
GameRegistry.addRecipe(new ItemStack(helm),
|
|
|
|
"OOO", "O O",
|
|
|
|
'O', base);
|
|
|
|
|
|
|
|
//Chest
|
|
|
|
GameRegistry.addRecipe(new ItemStack(chest),
|
|
|
|
"O O", "OOO", "OOO",
|
|
|
|
'O', base);
|
|
|
|
|
|
|
|
//Legs
|
|
|
|
GameRegistry.addRecipe(new ItemStack(pants),
|
|
|
|
"OOO", "O O", "O O",
|
|
|
|
'O', base);
|
|
|
|
|
|
|
|
//Boots
|
|
|
|
GameRegistry.addRecipe(new ItemStack(boots),
|
|
|
|
"O O", "O O",
|
|
|
|
'O', base);
|
|
|
|
}
|
2015-03-07 02:23:31 +01:00
|
|
|
}
|