ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiscCrafting.java

98 lines
4.5 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
2016-05-16 22:52:27 +02:00
* This file ("MiscCrafting.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:54:42 +02:00
* © 2015-2016 Ellpeck
2015-08-29 14:33:25 +02:00
*/
2016-01-05 04:47:35 +01:00
package de.ellpeck.actuallyadditions.mod.crafting;
2016-01-05 04:47:35 +01:00
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
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.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
2016-03-18 18:41:37 +01:00
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
2016-01-07 18:20:59 +01:00
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
2016-06-17 23:50:38 +02:00
public final class MiscCrafting{
2016-06-17 23:50:38 +02:00
public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
public static void init(){
//Bio Coal
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOCOAL.ordinal()), 1.0F);
//Crystals
for(int i = 0; i < TheCrystals.values().length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystal, 1, i)));
2016-06-17 23:50:38 +02:00
RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i)));
2016-06-17 23:50:38 +02:00
RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
}
//Dough
if(ConfigCrafting.DOUGH.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
"cropWheat", "cropWheat"));
2016-03-18 18:41:37 +01:00
ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
}
2015-05-20 22:39:43 +02:00
//Rice Dough
if(ConfigCrafting.RICE_DOUGH.isEnabled()){
2015-05-20 22:39:43 +02:00
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())));
2016-03-18 18:41:37 +01:00
ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
}
2015-05-20 22:39:43 +02:00
//Paper Cone
if(ConfigCrafting.PAPER_CONE.isEnabled()){
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
"P P", " P ",
2016-04-20 21:39:03 +02:00
'P', new ItemStack(Items.PAPER));
}
//Knife Handle
if(ConfigCrafting.KNIFE_HANDLE.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
"stickWood",
2016-04-20 21:39:03 +02:00
new ItemStack(Items.LEATHER)));
2016-03-18 18:41:37 +01:00
ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
}
//Knife Blade
if(ConfigCrafting.KNIFE_BLADE.isEnabled()){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
"K", "K", "F",
'K', "ingotIron",
2016-04-20 21:39:03 +02:00
'F', new ItemStack(Items.FLINT)));
2016-03-18 18:41:37 +01:00
ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe();
}
//Ender Star
if(ConfigCrafting.ENDER_STAR.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()),
new ItemStack(Items.NETHER_STAR),
new ItemStack(Items.DRAGON_BREATH),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(Items.PRISMARINE_SHARD)));
ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe();
}
}
}