Added config for ThermalGenerator eu out
This commit is contained in:
parent
9f99812490
commit
4cdf4aa7db
3 changed files with 37 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue