ActuallyAdditions/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensNoneRecipeHandler.java

111 lines
7 KiB
Java
Raw Normal View History

2016-01-05 04:47:35 +01:00
/*
* This file ("LensNoneRecipeHandler.java") is part of the Actually Additions Mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense/
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2016 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.items.lens;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.LensNoneRecipe;
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.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
2016-03-18 18:41:37 +01:00
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
2016-01-05 04:47:35 +01:00
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import java.util.ArrayList;
public class LensNoneRecipeHandler{
public static ArrayList<LensNoneRecipe> mainPageRecipes = new ArrayList<LensNoneRecipe>();
public static LensNoneRecipe recipeColorLens;
public static LensNoneRecipe recipeSoulSand;
public static LensNoneRecipe recipeGreenWall;
public static LensNoneRecipe recipeWhiteWall;
public static LensNoneRecipe recipeExplosionLens;
public static LensNoneRecipe recipeDamageLens;
public static LensNoneRecipe recipeLeather;
public static LensNoneRecipe recipeNetherWart;
2016-01-05 04:47:35 +01:00
public static void init(){
//Crystal Blocks
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-01-05 04:47:35 +01:00
//Crystal Items
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.DYE, 1, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 40);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
2016-03-18 18:41:37 +01:00
mainPageRecipes.add(RecipeUtil.lastReconstructorRecipe());
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
2016-01-05 04:47:35 +01:00
//Lenses
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new ItemStack(InitItems.itemColorLens), 5000);
2016-03-18 18:41:37 +01:00
recipeColorLens = RecipeUtil.lastReconstructorRecipe();
2016-01-05 04:47:35 +01:00
if(ConfigCrafting.RECONSTRUCTOR_EXPLOSION_LENS.isEnabled()){
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
2016-03-18 18:41:37 +01:00
recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
2016-01-05 04:47:35 +01:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
}
else{
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemDamageLens), 5000);
}
2016-03-18 18:41:37 +01:00
recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
2016-01-05 04:47:35 +01:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000);
//Misc
if(ConfigCrafting.RECONSTRUCTOR_MISC.isEnabled()){
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
2016-03-18 18:41:37 +01:00
recipeSoulSand = RecipeUtil.lastReconstructorRecipe();
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000);
2016-03-18 18:41:37 +01:00
recipeLeather = RecipeUtil.lastReconstructorRecipe();
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000);
2016-03-18 18:41:37 +01:00
recipeNetherWart = RecipeUtil.lastReconstructorRecipe();
2016-01-05 04:47:35 +01:00
}
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
2016-03-18 18:41:37 +01:00
recipeWhiteWall = RecipeUtil.lastReconstructorRecipe();
2016-04-20 21:39:03 +02:00
ActuallyAdditionsAPI.addReconstructorLensNoneRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
2016-03-18 18:41:37 +01:00
recipeGreenWall = RecipeUtil.lastReconstructorRecipe();
2016-01-05 04:47:35 +01:00
}
public static ArrayList<LensNoneRecipe> getRecipesFor(ItemStack input){
ArrayList<LensNoneRecipe> possibleRecipes = new ArrayList<LensNoneRecipe>();
for(LensNoneRecipe recipe : ActuallyAdditionsAPI.reconstructorLensNoneRecipes){
if(ItemUtil.contains(recipe.getInputs(), input, true)){
possibleRecipes.add(recipe);
}
}
return possibleRecipes;
}
}