2015-11-07 11:51:41 -05:00
|
|
|
package WayofTime.bloodmagic.registry;
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
|
|
|
import WayofTime.bloodmagic.alchemyArray.*;
|
2018-02-15 18:49:01 -08:00
|
|
|
import WayofTime.bloodmagic.compress.CompressionRegistry;
|
|
|
|
import WayofTime.bloodmagic.iface.ISigil;
|
|
|
|
import WayofTime.bloodmagic.livingArmour.LivingArmourUpgrade;
|
|
|
|
import WayofTime.bloodmagic.recipe.AlchemyTableCustomRecipe;
|
|
|
|
import WayofTime.bloodmagic.core.registry.AlchemyArrayRecipeRegistry;
|
|
|
|
import WayofTime.bloodmagic.core.registry.AlchemyTableRecipeRegistry;
|
|
|
|
import WayofTime.bloodmagic.core.registry.LivingArmourDowngradeRecipeRegistry;
|
2017-08-15 21:30:48 -07:00
|
|
|
import WayofTime.bloodmagic.client.render.alchemyArray.*;
|
|
|
|
import WayofTime.bloodmagic.compress.AdvancedCompressionHandler;
|
|
|
|
import WayofTime.bloodmagic.compress.BaseCompressionHandler;
|
|
|
|
import WayofTime.bloodmagic.compress.StorageBlockCraftingManager;
|
2017-08-15 18:14:28 -07:00
|
|
|
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
|
|
|
|
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
2017-08-15 21:30:48 -07:00
|
|
|
import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid;
|
|
|
|
import WayofTime.bloodmagic.item.alchemy.ItemLivingArmourPointsUpgrade;
|
2018-02-11 14:43:00 -08:00
|
|
|
import WayofTime.bloodmagic.item.types.ComponentTypes;
|
2017-08-15 21:30:48 -07:00
|
|
|
import WayofTime.bloodmagic.livingArmour.downgrade.*;
|
|
|
|
import WayofTime.bloodmagic.potion.BMPotionUtils;
|
|
|
|
import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTableDyeableRecipe;
|
|
|
|
import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTablePotionRecipe;
|
|
|
|
import WayofTime.bloodmagic.util.Utils;
|
|
|
|
import com.google.common.base.Stopwatch;
|
2016-05-04 19:25:42 -04:00
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
import net.minecraft.init.Items;
|
2016-07-26 19:05:48 -04:00
|
|
|
import net.minecraft.init.MobEffects;
|
2016-05-04 19:25:42 -04:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraft.item.crafting.FurnaceRecipes;
|
2016-07-26 19:05:48 -04:00
|
|
|
import net.minecraft.potion.PotionEffect;
|
2016-05-04 19:25:42 -04:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2016-10-08 21:23:16 -04:00
|
|
|
import net.minecraft.util.text.ITextComponent;
|
|
|
|
import net.minecraft.util.text.TextComponentTranslation;
|
2016-05-04 19:25:42 -04:00
|
|
|
import net.minecraftforge.oredict.OreDictionary;
|
2016-10-08 21:23:16 -04:00
|
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
|
|
2018-02-14 23:38:57 -08:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
2017-08-15 21:30:48 -07:00
|
|
|
import java.util.Map.Entry;
|
2016-05-02 11:24:22 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public class ModRecipes {
|
2017-08-19 20:45:11 -07:00
|
|
|
|
2016-06-12 10:28:03 -04:00
|
|
|
public static ArrayList<String> addedOreRecipeList = new ArrayList<String>();
|
2018-02-11 14:43:00 -08:00
|
|
|
static ItemStack mundaneLengtheningStack = ComponentTypes.CATALYST_LENGTH_1.getStack();
|
|
|
|
static ItemStack mundanePowerStack = ComponentTypes.CATALYST_POWER_1.getStack();
|
2016-06-12 10:28:03 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void init() {
|
2016-05-04 19:25:42 -04:00
|
|
|
initOreDict();
|
|
|
|
addFurnaceRecipes();
|
2015-12-30 15:34:40 -05:00
|
|
|
addAltarRecipes();
|
|
|
|
addAlchemyArrayRecipes();
|
2016-05-02 11:24:22 -04:00
|
|
|
addAlchemyTableRecipes();
|
2016-06-12 10:28:03 -04:00
|
|
|
addOreDoublingAlchemyRecipes();
|
2016-07-26 19:05:48 -04:00
|
|
|
addPotionRecipes();
|
2016-10-08 21:23:16 -04:00
|
|
|
addLivingArmourDowngradeRecipes();
|
2015-12-30 15:34:40 -05:00
|
|
|
}
|
2015-11-07 11:51:41 -05:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void initOreDict() {
|
2018-02-11 14:43:00 -08:00
|
|
|
OreDictionary.registerOre("dustIron", ComponentTypes.SAND_IRON.getStack());
|
|
|
|
OreDictionary.registerOre("dustGold", ComponentTypes.SAND_GOLD.getStack());
|
|
|
|
OreDictionary.registerOre("dustCoal", ComponentTypes.SAND_COAL.getStack());
|
2016-05-04 19:25:42 -04:00
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addFurnaceRecipes() {
|
2018-02-11 14:43:00 -08:00
|
|
|
FurnaceRecipes.instance().addSmeltingRecipe(ComponentTypes.SAND_IRON.getStack(), new ItemStack(Items.IRON_INGOT), (float) 0.15);
|
|
|
|
FurnaceRecipes.instance().addSmeltingRecipe(ComponentTypes.SAND_GOLD.getStack(), new ItemStack(Items.GOLD_INGOT), (float) 0.15);
|
2016-05-04 19:25:42 -04:00
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addAltarRecipes() {
|
2015-12-02 00:55:32 -08:00
|
|
|
|
2015-12-30 15:34:40 -05:00
|
|
|
}
|
2015-12-30 11:34:04 -05:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addAlchemyArrayRecipes() {
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.DIAMOND_SWORD), new AlchemyArrayEffectBinding("boundSword", Utils.setUnbreakable(new ItemStack(RegistrarBloodMagicItems.BOUND_SWORD))), new BindingAlchemyCircleRenderer());
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.DIAMOND_AXE), new AlchemyArrayEffectBinding("boundAxe", Utils.setUnbreakable(new ItemStack(RegistrarBloodMagicItems.BOUND_AXE))));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.DIAMOND_PICKAXE), new AlchemyArrayEffectBinding("boundPickaxe", Utils.setUnbreakable(new ItemStack(RegistrarBloodMagicItems.BOUND_PICKAXE))));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.DIAMOND_SHOVEL), new AlchemyArrayEffectBinding("boundShovel", Utils.setUnbreakable(new ItemStack(RegistrarBloodMagicItems.BOUND_SHOVEL))));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.IRON_HELMET), new AlchemyArrayEffectBinding("livingHelmet", new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_HELMET)));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.IRON_CHESTPLATE), new AlchemyArrayEffectBinding("livingChest", new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_CHEST)));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.IRON_LEGGINGS), new AlchemyArrayEffectBinding("livingLegs", new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_LEGGINGS)));
|
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_BINDING.getStack(), new ItemStack(Items.IRON_BOOTS), new AlchemyArrayEffectBinding("livingBoots", new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_BOOTS)));
|
2017-08-14 20:53:42 -07:00
|
|
|
|
2016-06-27 20:01:34 -04:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.ROTTEN_FLESH), new AlchemyArrayEffectAttractor("attractor"), new AttractorAlchemyCircleRenderer());
|
2016-06-29 07:43:04 -04:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.FEATHER), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectMovement("movement"), new StaticAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/MovementArray.png")));
|
2016-07-01 19:07:43 -04:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.FEATHER), new ItemStack(Items.GLOWSTONE_DUST), new AlchemyArrayEffectUpdraft("updraft"), new AttractorAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/UpdraftArray.png")));
|
2016-10-16 15:19:57 -04:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.SLIME_BALL), new ItemStack(Items.REDSTONE), new AlchemyArrayEffectBounce("bounce"), new SingleAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/BounceArray.png")));
|
2016-07-01 19:07:43 -04:00
|
|
|
|
2016-06-30 08:34:15 -04:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(new ItemStack(Items.ARROW), new ItemStack(Items.FEATHER), new AlchemyArrayEffectSkeletonTurret("skeletonTurret"), new DualAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret1.png"), new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/SkeletonTurret2.png")));
|
2016-10-22 16:11:30 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyArrayRecipeRegistry.registerRecipe(ComponentTypes.REAGENT_FAST_MINER.getStack(), new ItemStack(Items.IRON_PICKAXE), new AlchemyArrayEffectSigil("fastMiner", (ISigil) RegistrarBloodMagicItems.SIGIL_FAST_MINER), new SingleAlchemyCircleRenderer(new ResourceLocation("bloodmagic", "textures/models/AlchemyArrays/FastMinerSigil.png")));
|
2016-10-22 16:11:30 -04:00
|
|
|
|
2015-12-30 15:34:40 -05:00
|
|
|
}
|
2015-12-30 11:34:04 -05:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addCompressionHandlers() {
|
2016-04-24 10:06:28 -07:00
|
|
|
Stopwatch stopwatch = Stopwatch.createStarted();
|
2015-12-30 15:34:40 -05:00
|
|
|
StorageBlockCraftingManager.getInstance().addStorageBlockRecipes();
|
2016-04-24 10:06:28 -07:00
|
|
|
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.GLOWSTONE_DUST, 4, 0), new ItemStack(Blocks.GLOWSTONE), 64));
|
|
|
|
CompressionRegistry.registerHandler(new BaseCompressionHandler(new ItemStack(Items.SNOWBALL, 4, 0), new ItemStack(Blocks.SNOW), 8));
|
2015-12-30 15:34:40 -05:00
|
|
|
CompressionRegistry.registerHandler(new AdvancedCompressionHandler());
|
2015-12-30 11:34:04 -05:00
|
|
|
|
2016-04-24 10:06:28 -07:00
|
|
|
CompressionRegistry.registerItemThreshold(new ItemStack(Blocks.COBBLESTONE), 64);
|
|
|
|
stopwatch.stop();
|
|
|
|
|
2017-08-14 20:53:42 -07:00
|
|
|
BloodMagic.instance.logger.info("Added compression recipes in {}", stopwatch);
|
2015-12-30 15:34:40 -05:00
|
|
|
}
|
2016-01-08 10:27:26 -05:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addAlchemyTableRecipes() {
|
2016-05-02 20:08:25 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.STRING, 4), 0, 100, 0, Blocks.WOOL, Items.FLINT);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.FLINT, 2), 0, 20, 0, Blocks.GRAVEL, Items.FLINT);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.LEATHER, 4), 100, 200, 1, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.ROTTEN_FLESH, Items.FLINT, Items.WATER_BUCKET);
|
|
|
|
|
2017-03-14 19:13:08 -07:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE), 500, 200, 1, "gunpowder", "gunpowder", "dustCoal");
|
2016-05-05 15:46:09 -04:00
|
|
|
|
2016-05-02 20:08:25 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.BREAD), 100, 200, 1, Items.WHEAT, Items.SUGAR);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.GRASS), 200, 200, 1, Blocks.DIRT, new ItemStack(Items.DYE, 1, 15), Items.WHEAT_SEEDS);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.CLAY_BALL, 4), 50, 100, 2, Items.WATER_BUCKET, "sand");
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.CLAY, 5), 200, 200, 1, Items.WATER_BUCKET, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY, Blocks.HARDENED_CLAY);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Blocks.OBSIDIAN), 50, 50, 1, Items.WATER_BUCKET, Items.LAVA_BUCKET);
|
2016-05-04 19:25:42 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.SULFUR.getStack(8), 0, 100, 0, Items.LAVA_BUCKET);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.SALTPETER.getStack(4), 0, 100, 0, ComponentTypes.PLANT_OIL.getStack(), ComponentTypes.PLANT_OIL.getStack(), "dustCoal");
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(Items.GUNPOWDER, 3), 0, 100, 0, ComponentTypes.SALTPETER.getStack(), ComponentTypes.SULFUR.getStack(), new ItemStack(Items.COAL, 1, 1));
|
2016-05-06 17:51:39 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ComponentTypes.SAND_COAL.getStack(4), 100, 100, 1, new ItemStack(Items.COAL, 1, 0), new ItemStack(Items.COAL, 1, 0), Items.FLINT));
|
2016-05-04 19:25:42 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC), 1000, 400, 1, "dustCoal", "gunpowder", Items.REDSTONE, Items.SUGAR, ComponentTypes.PLANT_OIL.getStack(), new ItemStack(Items.POTIONITEM));
|
2016-05-05 07:59:08 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ComponentTypes.SAND_IRON.getStack(2), 400, 200, 1, "oreIron", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(ComponentTypes.SAND_GOLD.getStack(2), 400, 200, 1, "oreGold", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
|
2016-05-05 07:59:08 -04:00
|
|
|
|
2016-06-12 10:28:03 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Items.REDSTONE, 8), 400, 200, 1, "oreRedstone", ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
|
|
|
|
|
|
|
|
addedOreRecipeList.add("oreIron");
|
|
|
|
addedOreRecipeList.add("oreGold");
|
|
|
|
addedOreRecipeList.add("oreCoal");
|
|
|
|
addedOreRecipeList.add("oreRedstone");
|
|
|
|
|
2016-05-05 15:46:09 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Blocks.GRAVEL), 50, 50, 1, "cobblestone", ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE)));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(new ItemStack(Blocks.SAND), 50, 50, 1, Blocks.GRAVEL, ItemCuttingFluid.getStack(ItemCuttingFluid.EXPLOSIVE)));
|
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.PLANT_OIL.getStack(), 100, 100, 1, "cropCarrot", "cropCarrot", "cropCarrot", new ItemStack(Items.DYE, 1, 15));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.PLANT_OIL.getStack(), 100, 100, 1, "cropPotato", "cropPotato", new ItemStack(Items.DYE, 1, 15));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.PLANT_OIL.getStack(), 100, 100, 1, "cropWheat", "cropWheat", new ItemStack(Items.DYE, 1, 15));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.PLANT_OIL.getStack(), 100, 100, 1, Items.BEETROOT, Items.BEETROOT, Items.BEETROOT, new ItemStack(Items.DYE, 1, 15));
|
2016-06-09 21:43:37 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.NEURO_TOXIN.getStack(), 1000, 100, 2, new ItemStack(Items.FISH, 1, 3));
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.ANTISEPTIC.getStack(2), 1000, 200, 2, ComponentTypes.PLANT_OIL.getStack(), "nuggetGold", "cropWheat", Items.SUGAR, Blocks.BROWN_MUSHROOM, Blocks.RED_MUSHROOM);
|
2016-06-12 15:20:48 -04:00
|
|
|
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ItemLivingArmourPointsUpgrade.getStack(ItemLivingArmourPointsUpgrade.DRAFT_ANGELUS), 20000, 400, 3, ComponentTypes.NEURO_TOXIN.getStack(), ComponentTypes.ANTISEPTIC.getStack(), "dustGold", Items.FERMENTED_SPIDER_EYE, new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD, 1, 0), Items.GHAST_TEAR);
|
2016-06-12 15:20:48 -04:00
|
|
|
|
2017-08-14 20:53:42 -07:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableDyeableRecipe(0, 100, 0, new ItemStack(RegistrarBloodMagicItems.SIGIL_HOLDING)));
|
2016-07-26 19:05:48 -04:00
|
|
|
|
2017-08-14 20:53:42 -07:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(RegistrarBloodMagicItems.POTION_FLASK), 1000, 200, 2, new ItemStack(Items.POTIONITEM), "cropNetherWart", "dustRedstone", "dustGlowstone");
|
2018-02-11 14:43:00 -08:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.CATALYST_LENGTH_1.getStack(), 1000, 100, 2, "gunpowder", "cropNetherWart", "gemLapis");
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(ComponentTypes.CATALYST_POWER_1.getStack(), 1000, 100, 2, "gunpowder", "cropNetherWart", "dustRedstone");
|
2016-05-02 11:24:22 -04:00
|
|
|
}
|
2016-06-12 10:28:03 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addOreDoublingAlchemyRecipes() {
|
2016-06-12 10:28:03 -04:00
|
|
|
String[] oreList = OreDictionary.getOreNames().clone();
|
2017-08-15 21:30:48 -07:00
|
|
|
for (String ore : oreList) {
|
|
|
|
if (ore.startsWith("ore") && !addedOreRecipeList.contains(ore)) {
|
2016-06-12 10:28:03 -04:00
|
|
|
String dustName = ore.replaceFirst("ore", "dust");
|
|
|
|
|
2017-02-13 17:13:28 -08:00
|
|
|
List<ItemStack> discoveredOres = OreDictionary.getOres(ore);
|
2016-06-12 10:28:03 -04:00
|
|
|
List<ItemStack> dustList = OreDictionary.getOres(dustName);
|
2017-08-15 21:30:48 -07:00
|
|
|
if (dustList != null && !dustList.isEmpty() && discoveredOres != null && !discoveredOres.isEmpty()) {
|
2016-06-12 10:28:03 -04:00
|
|
|
ItemStack dustStack = dustList.get(0).copy();
|
2016-12-12 19:56:36 -08:00
|
|
|
dustStack.setCount(2);
|
2016-06-12 10:28:03 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableCustomRecipe(dustStack, 400, 200, 1, ore, ItemCuttingFluid.getStack(ItemCuttingFluid.BASIC)));
|
|
|
|
addedOreRecipeList.add(ore);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-07-26 19:05:48 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addPotionRecipes() {
|
2016-07-26 19:44:42 -04:00
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.GHAST_TEAR), new PotionEffect(MobEffects.REGENERATION, 450));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.GOLDEN_CARROT), new PotionEffect(MobEffects.NIGHT_VISION, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.MAGMA_CREAM), new PotionEffect(MobEffects.FIRE_RESISTANCE, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.WATER_BUCKET), new PotionEffect(MobEffects.WATER_BREATHING, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.SUGAR), new PotionEffect(MobEffects.SPEED, 2 * 60 * 20));
|
2016-07-26 19:52:38 -04:00
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.SPECKLED_MELON), new PotionEffect(MobEffects.INSTANT_HEALTH, 1));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.SPIDER_EYE), new PotionEffect(MobEffects.POISON, 450));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.DYE, 1, 0), new PotionEffect(MobEffects.BLINDNESS, 450));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.FERMENTED_SPIDER_EYE), new PotionEffect(MobEffects.WEAKNESS, 450));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.BLAZE_POWDER), new PotionEffect(MobEffects.STRENGTH, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.FEATHER), new PotionEffect(MobEffects.JUMP_BOOST, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.CLAY_BALL), new PotionEffect(MobEffects.SLOWNESS, 450));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.REDSTONE), new PotionEffect(MobEffects.HASTE, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.GLASS_BOTTLE), new PotionEffect(MobEffects.INVISIBILITY, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.POISONOUS_POTATO), new PotionEffect(MobEffects.SATURATION, 1));
|
2017-08-14 20:53:42 -07:00
|
|
|
addPotionRecipe(1000, 1, new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD, 1, 0), new PotionEffect(MobEffects.HEALTH_BOOST, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Blocks.SLIME_BLOCK), new PotionEffect(RegistrarBloodMagic.BOUNCE, 2 * 60 * 20));
|
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.STRING), new PotionEffect(RegistrarBloodMagic.CLING, 2 * 60 * 20));
|
2016-08-10 17:24:36 -04:00
|
|
|
|
2017-08-14 20:53:42 -07:00
|
|
|
addPotionRecipe(1000, 1, new ItemStack(Items.BEETROOT), new PotionEffect(RegistrarBloodMagic.DEAFNESS, 450));
|
2016-10-02 15:03:31 -04:00
|
|
|
|
2016-10-13 19:58:39 -04:00
|
|
|
// AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(5000, 100, 4, new ItemStack(Blocks.SLIME_BLOCK), new PotionEffect(ModPotions.bounce, 15 * 60 * 20)));
|
2017-03-14 19:13:08 -07:00
|
|
|
// AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(5000, 100, 4, new ItemStack("string"), new PotionEffect(ModPotions.bounce, 15 * 60 * 20)));
|
2016-07-26 19:44:42 -04:00
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addPotionRecipe(int lpDrained, int tier, ItemStack inputStack, PotionEffect baseEffect) {
|
2016-07-26 19:44:42 -04:00
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(lpDrained, 100, tier, inputStack, baseEffect));
|
|
|
|
|
|
|
|
List<ItemStack> lengtheningList = new ArrayList<ItemStack>();
|
|
|
|
lengtheningList.add(inputStack);
|
|
|
|
lengtheningList.add(mundaneLengtheningStack);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getLengthAugmentRecipe(lpDrained, 100, tier, lengtheningList, baseEffect, 1));
|
|
|
|
|
|
|
|
List<ItemStack> powerList = new ArrayList<ItemStack>();
|
|
|
|
powerList.add(inputStack);
|
|
|
|
powerList.add(mundanePowerStack);
|
|
|
|
AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getPowerAugmentRecipe(lpDrained, 100, tier, powerList, baseEffect, 1));
|
2016-07-26 19:05:48 -04:00
|
|
|
}
|
2016-10-08 21:23:16 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addLivingArmourDowngradeRecipes() {
|
2017-01-02 01:18:29 -08:00
|
|
|
String messageBase = "ritual.bloodmagic.downgradeRitual.dialogue.";
|
2016-10-08 21:23:16 -04:00
|
|
|
|
|
|
|
ItemStack bowStack = new ItemStack(Items.BOW);
|
2016-10-10 10:57:29 -04:00
|
|
|
ItemStack bottleStack = new ItemStack(Items.POTIONITEM, 1, 0);
|
|
|
|
ItemStack swordStack = new ItemStack(Items.STONE_SWORD);
|
2016-11-23 18:46:18 -05:00
|
|
|
ItemStack goldenAppleStack = new ItemStack(Items.GOLDEN_APPLE);
|
|
|
|
ItemStack fleshStack = new ItemStack(Items.ROTTEN_FLESH);
|
|
|
|
ItemStack shieldStack = new ItemStack(Items.SHIELD);
|
|
|
|
ItemStack pickStack = new ItemStack(Items.STONE_PICKAXE);
|
|
|
|
ItemStack minecartStack = new ItemStack(Items.MINECART);
|
|
|
|
ItemStack stringStack = new ItemStack(Items.STRING);
|
2016-10-08 21:23:16 -04:00
|
|
|
|
|
|
|
Map<ItemStack, Pair<String, int[]>> dialogueMap = new HashMap<ItemStack, Pair<String, int[]>>();
|
2017-08-15 21:30:48 -07:00
|
|
|
dialogueMap.put(bowStack, Pair.of("bow", new int[]{1, 100, 300, 500}));
|
|
|
|
dialogueMap.put(bottleStack, Pair.of("quenched", new int[]{1, 100, 300, 500}));
|
|
|
|
dialogueMap.put(swordStack, Pair.of("dulledBlade", new int[]{1, 100, 300, 500, 700}));
|
|
|
|
dialogueMap.put(goldenAppleStack, Pair.of("slowHeal", new int[]{1, 100, 300, 500, 700}));
|
2016-10-08 21:23:16 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
for (Entry<ItemStack, Pair<String, int[]>> entry : dialogueMap.entrySet()) {
|
2016-10-08 21:23:16 -04:00
|
|
|
ItemStack keyStack = entry.getKey();
|
|
|
|
String str = entry.getValue().getKey();
|
|
|
|
Map<Integer, List<ITextComponent>> textMap = new HashMap<Integer, List<ITextComponent>>();
|
2017-08-15 21:30:48 -07:00
|
|
|
for (int tick : entry.getValue().getValue()) {
|
2016-10-08 21:23:16 -04:00
|
|
|
List<ITextComponent> textList = new ArrayList<ITextComponent>();
|
2016-10-10 10:57:29 -04:00
|
|
|
textList.add(new TextComponentTranslation("\u00A74%s", new TextComponentTranslation(messageBase + str + "." + tick)));
|
2016-10-08 21:23:16 -04:00
|
|
|
textMap.put(tick, textList);
|
|
|
|
}
|
|
|
|
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerDialog(keyStack, textMap);
|
|
|
|
}
|
|
|
|
|
2017-03-14 19:13:08 -07:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(0), bowStack, Items.ARROW, "string", "ingotIron", "ingotIron");
|
2016-10-10 10:57:29 -04:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(1), bowStack, Items.SPECTRAL_ARROW, "ingotGold", "dustRedstone", "dustGlowstone", "gemLapis");
|
2017-03-14 19:13:08 -07:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(2), bowStack, "gemDiamond", Items.FIRE_CHARGE, Items.BLAZE_ROD, "feather");
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(3), bowStack, Items.PRISMARINE_SHARD, Items.BLAZE_ROD, "feather", "feather");
|
2016-10-10 10:57:29 -04:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeStormTrooper(4), bowStack, new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(Items.TIPPED_ARROW, 1, OreDictionary.WILDCARD_VALUE));
|
2016-10-08 21:23:16 -04:00
|
|
|
// LivingArmourDowngradeRecipeRegistry.registerDialog(bowStack, bowMap);
|
2016-10-10 10:57:29 -04:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeQuenched(0), bottleStack, Items.DRAGON_BREATH);
|
2016-11-23 18:46:18 -05:00
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(new LivingArmourUpgradeCrippledArm(0), shieldStack, "gemDiamond");
|
2016-10-10 10:57:29 -04:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
for (int i = 0; i < 10; i++) {
|
2016-11-23 18:46:18 -05:00
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeMeleeDecrease(i), swordStack, i);
|
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeSlowHeal(i), goldenAppleStack, i);
|
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeBattleHungry(i), fleshStack, i);
|
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeDigSlowdown(i), pickStack, i);
|
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeDisoriented(i), minecartStack, i);
|
|
|
|
addRecipeForTieredDowngrade(new LivingArmourUpgradeSlowness(i), stringStack, i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
public static void addRecipeForTieredDowngrade(LivingArmourUpgrade upgrade, ItemStack stack, int tier) {
|
|
|
|
switch (tier) {
|
|
|
|
case 0:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "ingotIron", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 0));
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "dustRedstone", "dustRedstone", "ingotIron", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 0));
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, "ingotGold", "gemLapis", "gemLapis", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 1));
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.VINE, "dyeRed", Items.GOLDEN_CARROT, new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 1));
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.GOLDEN_APPLE, "treeSapling", "treeSapling", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 2));
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.IRON_BLOCK, Blocks.REDSTONE_BLOCK, new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 2));
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.IRON_BLOCK, Blocks.GLOWSTONE, "ingotGold", "ingotGold", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 3));
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Blocks.GOLD_BLOCK, Blocks.LAPIS_BLOCK, "gemDiamond", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 3));
|
|
|
|
break;
|
|
|
|
case 8:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.DRAGON_BREATH, "gemDiamond", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 4));
|
|
|
|
break;
|
|
|
|
case 9:
|
|
|
|
LivingArmourDowngradeRecipeRegistry.registerRecipe(upgrade, stack, Items.NETHER_STAR, "gemDiamond", "gemDiamond", new ItemStack(RegistrarBloodMagicItems.SLATE, 1, 4));
|
2017-08-14 20:53:42 -07:00
|
|
|
}
|
|
|
|
}
|
2015-11-07 11:51:41 -05:00
|
|
|
}
|