From 152a97616ece686390de30ac2ffe18a81f19fd84 Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Tue, 26 Sep 2017 07:44:32 +0300 Subject: [PATCH] Added configuration for Empowerer and Display Stand --- .../mod/config/values/ConfigIntListValues.java | 4 +++- .../mod/config/values/ConfigIntValues.java | 4 +++- .../mod/recipe/EmpowererHandler.java | 11 ++++++++--- .../mod/tile/TileEntityDisplayStand.java | 4 +++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java index bdd913e26..c2667055a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java @@ -25,7 +25,9 @@ public enum ConfigIntListValues{ ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE("Atomic Reconstructor: Lenses Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, new int[]{200, 350, 250000, 250000, 2500, 60000, 70000, 150000}, "Amount of energy used by each Lens type.\nOrder of lenses: Color, Certain Death, Detonation, Disenchanting, Killer, Miner, Miner (for nether ores), Disruption."), ATOMIC_RECONSTRUCTOR_CRYSTALLIZATION_RECIPE_COSTS("Atomic Reconstructor: Crystallization Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{40, 40, 60, 100, 60, 80, 400, 400, 600, 1000, 600, 800, 2000}, "Amount of energy used to crystallize item.\nOrder of items: Restonia Crystal, Palis Crystal, Diamatine Crystal, Emeradic Crystal, Void Crystal, Enori Crystal, Restonia Block, Palis Block, Diamatine Block, Emeradic Block, Void Block, Enori Block, Crystallized Canola Seed"), - ATOMIC_RECONSTRUCTOR_CONVERSION_RECIPE_COSTS("Atomic Reconstructor: Conversion Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{5000, 2000, 20000, 8000, 150000, 30000, 10, 10}, "Amount of energy used to convert item to another one.\nOrder of items: Lenses, Relays, Soul Sand, Leather, Nether Wart, Prismarine, Ethetic Quartz, Ethetic Green Block"); + ATOMIC_RECONSTRUCTOR_CONVERSION_RECIPE_COSTS("Atomic Reconstructor: Conversion Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{5000, 2000, 20000, 8000, 150000, 30000, 10, 10}, "Amount of energy used to create item from another one by conversion.\nOrder of items: Lenses, Relays, Soul Sand, Leather, Nether Wart, Prismarine, Ethetic Quartz, Ethetic Green Block"), + EMPOWERER_RECIPE_COSTS("Empowerer: Recipe Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{5000, 50000, 1000}, "Amount of energy per Display Stand used per tick to craft item in Empowerer.\nOrder of items: Empowered Crystals, Empowered Crystal Blocks, Empowered Canola Seed"), + EMPOWERER_RECIPE_DURATIONS("Empowerer: Recipe Duration", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{50, 500, 30}, "Time in ticks required to craft item in Empowerer.\nOrder of items: Empowered Crystals, Empowered Crystal Blocks, Empowered Canola Seed"); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java index 5efb1cc67..99659da78 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java @@ -56,7 +56,9 @@ public enum ConfigIntValues{ ATOMIC_RECONSTRUCTOR_ENERGY_CAPACITY("Atomic Reconstructor: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 300000, 1000, 1000000000, "Amount of energy Atomic Reconstructor can store."), ATOMIC_RECONSTRUCTOR_ENERGY_RECEIVE("Atomic Reconstructor: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 5000, 1, 1000000000, "Amount of energy Atomic Reconstructor can receive per tick."), - ATOMIC_RECONSTRUCTOR_ENERGY_USE("Atomic Reconstructor: Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, 1000, 1, 1000000000, "Basic amount of energy Atomic Reconstructor uses per craft."); + ATOMIC_RECONSTRUCTOR_ENERGY_USE("Atomic Reconstructor: Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, 1000, 1, 1000000000, "Basic amount of energy Atomic Reconstructor uses per craft."), + DISPLAY_STAND_ENERGY_CAPACITY("Display Stand: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 80000, 1000, 1000000000, "Amount of energy Display Stand can store."), + DISPLAY_STAND_ENERGY_RECEIVE("Display Stand: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Display Stand can receive per tick."); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/EmpowererHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/EmpowererHandler.java index f962cf885..89c08b25f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/EmpowererHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/EmpowererHandler.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.recipe; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; @@ -44,7 +45,9 @@ public final class EmpowererHandler{ } ItemStack seed = new ItemStack(InitItems.itemCanolaSeed); - ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.EMPOWERED_CANOLA_SEED.ordinal()), seed, seed, seed, seed, 1000, 30, new float[]{1F, 91F/255F, 76F/255F}); + int[] recipeCosts = ConfigIntListValues.EMPOWERER_RECIPE_COSTS.getValue(); + int[] recipeDurations = ConfigIntListValues.EMPOWERER_RECIPE_DURATIONS.getValue(); + ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.EMPOWERED_CANOLA_SEED.ordinal()), seed, seed, seed, seed, recipeCosts[2], recipeDurations[2], new float[]{1F, 91F/255F, 76F/255F}); recipeEmpoweredCanolaSeed = RecipeUtil.lastEmpowererRecipe(); } @@ -52,10 +55,12 @@ public final class EmpowererHandler{ float[] color = type.conversionColorParticles; List dyes = OreDictionary.getOres(dye); + int[] recipeCosts = ConfigIntListValues.EMPOWERER_RECIPE_COSTS.getValue(); + int[] recipeDurations = ConfigIntListValues.EMPOWERER_RECIPE_DURATIONS.getValue(); for(ItemStack dyeStack : dyes){ - ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitItems.itemCrystal, 1, type.ordinal()), new ItemStack(InitItems.itemCrystalEmpowered, 1, type.ordinal()), dyeStack, modifier1, modifier2, modifier3, 5000, 50, color); + ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitItems.itemCrystal, 1, type.ordinal()), new ItemStack(InitItems.itemCrystalEmpowered, 1, type.ordinal()), dyeStack, modifier1, modifier2, modifier3, recipeCosts[0], recipeDurations[0], color); MAIN_PAGE_RECIPES.add(RecipeUtil.lastEmpowererRecipe()); - ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitBlocks.blockCrystal, 1, type.ordinal()), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, type.ordinal()), dyeStack, modifier1, modifier2, modifier3, 50000, 500, color); + ActuallyAdditionsAPI.addEmpowererRecipe(new ItemStack(InitBlocks.blockCrystal, 1, type.ordinal()), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, type.ordinal()), dyeStack, modifier1, modifier2, modifier3, recipeCosts[1], recipeDurations[1], color); MAIN_PAGE_RECIPES.add(RecipeUtil.lastEmpowererRecipe()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java index be8f88021..5316ceffd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java @@ -11,6 +11,7 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.block.Block; import net.minecraft.item.Item; @@ -22,11 +23,12 @@ import net.minecraftforge.energy.IEnergyStorage; public class TileEntityDisplayStand extends TileEntityInventoryBase implements IEnergyDisplay{ - public final CustomEnergyStorage storage = new CustomEnergyStorage(80000, 1000, 0); + public final CustomEnergyStorage storage; private int oldEnergy; public TileEntityDisplayStand(){ super(1, "displayStand"); + this.storage = new CustomEnergyStorage(ConfigIntValues.DISPLAY_STAND_ENERGY_CAPACITY.getValue(), ConfigIntValues.DISPLAY_STAND_ENERGY_RECEIVE.getValue(), 0); } @Override