Added configuration for Bio Reactor

This commit is contained in:
OneEyeMaker 2017-09-28 07:26:38 +03:00
parent 251663030e
commit 6145ec9470
3 changed files with 10 additions and 5 deletions

View file

@ -27,7 +27,7 @@ public enum ConfigIntListValues{
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"),
OIL_GENERATOR_ENERGY_PRODUCTION("Oil Generator: Energy Production", ConfigCategories.MACHINE_ENERGY_VALUES, new int[]{40, 80, 100, 120}, "Amound of energy Oil Generator produces for each oil type.\nThese values change energy density of each type of oil.\nConfig option 'Oil Gen: Power Values' is obsolete, please remove it."),
OIL_GENERATOR_BURN_TIME("Oil Generator: Production Time", ConfigCategories.MACHINE_ENERGY_VALUES, new int[]{100, 120, 280, 400}, "Time in seconds each type of oil burns in Oil Generator.\nThese values change burn time of each type of oil.\nConfig option 'Oil Gen: Time Values' is obsolete, please remove it.");
OIL_GENERATOR_BURN_TIME("Oil Generator: Production Time", ConfigCategories.MACHINE_VALUES, new int[]{100, 120, 280, 400}, "Time in seconds each type of oil burns in Oil Generator.\nThese values change burn time of each type of oil.\nConfig option 'Oil Gen: Time Values' is obsolete, please remove it.");
public final String name;
public final String category;

View file

@ -79,7 +79,11 @@ public enum ConfigIntValues{
LEAF_GENERATOR_ENERGY_CAPACITY("Leaf-Eating Generator: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 35000, 1000, 1000000000, "Amount of energy Leaf-Eating Generator can store."),
LEAF_GENERATOR_ENERGY_SEND("Leaf-Eating Generator: Energy Send Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 450, 1, 1000000000, "Amount of energy Leaf-Eating Generator can send per tick."),
LEAF_GENERATOR_ENERGY_PRODUCTION("Leaf-Eating Generator: Energy Production", ConfigCategories.MACHINE_ENERGY_VALUES, 300, 1, 1000000000, "Amount of energy Leaf-Eating Generator produces per leaf block."),
LEAF_GENERATOR_WORK_RANGE("Leaf-Eating Generator: Work Range", ConfigCategories.MACHINE_VALUES, 7, 1, 16, "Radius (in blocks) in which Leaf-Eating Generator consumes leaves.");
LEAF_GENERATOR_WORK_RANGE("Leaf-Eating Generator: Work Range", ConfigCategories.MACHINE_VALUES, 7, 1, 16, "Radius (in blocks) in which Leaf-Eating Generator consumes leaves."),
BIO_REACTOR_ENERGY_CAPACITY("Bio Reactor: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 200000, 1000, 1000000000, "Amount of energy Bio Reactor can store."),
BIO_REACTOR_ENERGY_SEND("Bio Reactor: Energy Send Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 800, 1, 1000000000, "Amount of energy Bio Reactor can send per tick."),
BIO_REACTOR_ENERGY_PRODUCTION("Bio Reactor: Energy Production Per Type", ConfigCategories.MACHINE_ENERGY_VALUES, 2, 1, 10000, "Amount of energy Bio Reactor produces per item time.\nResulting energy production is: (this value * amount of different items) ^ 2."),
BIO_REACTOR_BURN_TIME("Bio Reactor: Maximum Burn Time", ConfigCategories.MACHINE_VALUES, 200, 1, 72000, "Maximum time in ticks Bio Reactor can burn one item.\nLow values can result in nonoperability of Bio Reactor.");
public final String name;
public final String category;

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.Block;
import net.minecraft.block.IGrowable;
@ -28,7 +29,7 @@ import java.util.List;
public class TileEntityBioReactor extends TileEntityInventoryBase implements ISharingEnergyProvider{
public final CustomEnergyStorage storage = new CustomEnergyStorage(200000, 0, 800);
public final CustomEnergyStorage storage = new CustomEnergyStorage(ConfigIntValues.BIO_REACTOR_ENERGY_CAPACITY.getValue(), 0, ConfigIntValues.BIO_REACTOR_ENERGY_SEND.getValue());
public int burnTime;
public int maxBurnTime;
@ -86,9 +87,9 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements ISh
if(types != null && !types.isEmpty()){
int amount = types.size();
this.producePerTick = (int)Math.pow(amount*2, 2);
this.producePerTick = (int)Math.pow(amount*ConfigIntValues.BIO_REACTOR_ENERGY_PRODUCTION.getValue(), 2);
this.maxBurnTime = 200-(int)Math.pow(1.8, amount);
this.maxBurnTime = ConfigIntValues.BIO_REACTOR_BURN_TIME.getValue()-(int)Math.pow(1.8, amount);
this.burnTime = this.maxBurnTime;
}
else{