mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-14 04:09:09 +01:00
Added configuration for Bio Reactor
This commit is contained in:
parent
1923a38884
commit
e6ba9dc131
2 changed files with 14 additions and 7 deletions
|
@ -115,7 +115,12 @@ public enum ConfigIntValues{
|
|||
EMPOWERER_CRYSTAL_ENERGY_COST("Empowerer: Empowered Crystal Creation Cost", ConfigCategories.MACHINE_RECIPE_COSTS, 5000, 1, 1000000000, "Amount of energy (per Display Stand) used by Empowerer to create Empowered Crystal"),
|
||||
EMPOWERER_CRYSTAL_CREATION_TIME("Empowerer: Empowered Crystal Creation Time", ConfigCategories.MACHINE_RECIPE_COSTS, 50, 1, 72000, "Time (in ticks) required to create Empowered Crystal in Empowerer"),
|
||||
EMPOWERER_BLOCK_ENERGY_COST("Empowerer: Empowered Crystal Block Creation Cost", ConfigCategories.MACHINE_RECIPE_COSTS, 50000, 1, 1000000000, "Amount of energy (per Display Stand) used by Empowerer to create Empowered Crystal Block"),
|
||||
EMPOWERER_BLOCK_CREATION_TIME("Empowerer: Empowered Crystal Block Creation Time", ConfigCategories.MACHINE_RECIPE_COSTS, 500, 1, 72000, "Time (in ticks) required to create Empowered Crystal Block in Empowerer");
|
||||
EMPOWERER_BLOCK_CREATION_TIME("Empowerer: Empowered Crystal Block Creation Time", ConfigCategories.MACHINE_RECIPE_COSTS, 500, 1, 72000, "Time (in ticks) required to create Empowered Crystal Block in Empowerer"),
|
||||
|
||||
BIO_REACTOR_ENERGY_CAPACITY("Bio Reactor Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 200000, 1, 1000000000, "Amount of energy Bio Reactor can store"),
|
||||
BIO_REACTOR_ENERGY_SEND("Bio Reactor Energy Send", ConfigCategories.MACHINE_ENERGY_VALUES, 800, 1, 1000000000, "Amount of energy Bio Reactor can send per tick"),
|
||||
BIO_REACTOR_ENERGY_PER_ITEM("Bio Reactor Energy Generation Per Item", ConfigCategories.MACHINE_ENERGY_VALUES, 2, 1, 1000000, "Amount of energy Bio Reactor per item/per tick; this value will be squared"),
|
||||
BIO_REACTOR_BURN_TIME("Bio Reactor Base Reaction Time", ConfigCategories.MACHINE_VALUES, 200, 1, 72000, "Base reaction time (in ticks) for one item in Bio Reactor");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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;
|
||||
|
@ -23,12 +27,9 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityBioReactor extends TileEntityInventoryBase implements ISharingEnergyProvider{
|
||||
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(200000, 0, 800);
|
||||
public final CustomEnergyStorage storage;
|
||||
|
||||
public int burnTime;
|
||||
public int maxBurnTime;
|
||||
|
@ -39,6 +40,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements ISh
|
|||
|
||||
public TileEntityBioReactor(){
|
||||
super(8, "bioReactor");
|
||||
this.storage = new CustomEnergyStorage(ConfigIntValues.BIO_REACTOR_ENERGY_CAPACITY.getValue(), 0, ConfigIntValues.BIO_REACTOR_ENERGY_SEND.getValue());
|
||||
}
|
||||
|
||||
public static boolean isValidItem(ItemStack stack){
|
||||
|
@ -86,9 +88,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_PER_ITEM.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{
|
||||
|
|
Loading…
Reference in a new issue