Added config for ThermalGenerator eu out

This commit is contained in:
modmuss50 2015-04-11 18:29:46 +01:00
parent 9f99812490
commit 4cdf4aa7db
3 changed files with 37 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import net.minecraftforge.common.config.Configuration;
public class ConfigTechReborn {
private static ConfigTechReborn instance = null;
public static String CATEGORY_WORLD = "world";
public static String CATEGORY_POWER = "power";
//WORLDGEN
public static boolean GalenaOreTrue;
@ -22,6 +23,8 @@ public class ConfigTechReborn {
public static boolean OlivineOreTrue;
public static boolean SodaliteOreTrue;
//Power
public static int ThermalGenertaorOutput;
public static Configuration config;
@ -109,6 +112,11 @@ public class ConfigTechReborn {
"Allow SodaliteOre", true,
"Allow SodaliteOre to be generated in your world.")
.getBoolean(true);
ThermalGenertaorOutput = config.get(CATEGORY_POWER,
"Thermal Generator Power", 30,
"The amount of power that the thermal generator makes for 1mb of lava")
.getInt();
if (config.hasChanged())
config.save();

View file

@ -27,7 +27,9 @@ public class TechRebornConfigGui extends GuiConfig{
"tr.configgui.category.trGeneral", TRGeneral.class));
list.add(new DummyConfigElement.DummyCategoryElement("World Gen",
"tr.configgui.category.trWorld", TRWORLD.class));
list.add(new DummyConfigElement.DummyCategoryElement("Power",
"tr.configgui.category.trPower", TRPOWER.class));
return list;
}
@ -75,4 +77,28 @@ public class TechRebornConfigGui extends GuiConfig{
.toString()));
}
}
// Power
public static class TRPOWER extends CategoryEntry {
public TRPOWER(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
return new GuiConfig(this.owningScreen,
(new ConfigElement(ConfigTechReborn.config
.getCategory(ConfigTechReborn.CATEGORY_POWER)))
.getChildElements(), this.owningScreen.modID,
Configuration.CATEGORY_GENERAL,
this.configElement.requiresWorldRestart()
|| this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart()
|| this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
.toString()));
}
}
}

View file

@ -17,6 +17,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.util.FluidUtils;
import techreborn.util.Inventory;
@ -27,7 +28,7 @@ public class TileThermalGenerator extends TileEntity implements IWrenchable, IFl
public Tank tank = new Tank("TileThermalGenerator", FluidContainerRegistry.BUCKET_VOLUME * 10, this);
public Inventory inventory = new Inventory(3, "TileThermalGenerator", 64);
public BasicSource energySource;
public static final int euTick = 30;
public static final int euTick = ConfigTechReborn.ThermalGenertaorOutput;
public TileThermalGenerator() {
this.energySource = new BasicSource(this, 1000000, 1);