parent
b9448d5d90
commit
33985f1a31
444 changed files with 26235 additions and 32364 deletions
|
@ -1,11 +1,10 @@
|
|||
package techreborn.config;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigTechReborn
|
||||
{
|
||||
import java.io.File;
|
||||
|
||||
public class ConfigTechReborn {
|
||||
private static ConfigTechReborn instance = null;
|
||||
public static String CATEGORY_WORLD = "world";
|
||||
public static String CATEGORY_POWER = "power";
|
||||
|
@ -138,8 +137,7 @@ public class ConfigTechReborn
|
|||
|
||||
public static Configuration config;
|
||||
|
||||
private ConfigTechReborn(File configFile)
|
||||
{
|
||||
private ConfigTechReborn(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
config.load();
|
||||
|
||||
|
@ -149,8 +147,7 @@ public class ConfigTechReborn
|
|||
|
||||
}
|
||||
|
||||
public static ConfigTechReborn initialize(File configFile)
|
||||
{
|
||||
public static ConfigTechReborn initialize(File configFile) {
|
||||
|
||||
if (instance == null)
|
||||
instance = new ConfigTechReborn(configFile);
|
||||
|
@ -160,18 +157,15 @@ public class ConfigTechReborn
|
|||
return instance;
|
||||
}
|
||||
|
||||
public static ConfigTechReborn instance()
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
public static ConfigTechReborn instance() {
|
||||
if (instance == null) {
|
||||
|
||||
throw new IllegalStateException("Instance of TechReborn Config requested before initialization");
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static void Configs()
|
||||
{
|
||||
public static void Configs() {
|
||||
RubberSaplingLoot = config
|
||||
.get(CATEGORY_WORLD, "Rubber Sapling Loot", true, "Allow Rubber Saplings to generate in loot chests")
|
||||
.getBoolean(true);
|
||||
|
@ -213,14 +207,16 @@ public class ConfigTechReborn
|
|||
aesuMaxStorage = config.get(CATEGORY_POWER, "AESU Max Storage", 30, "Set the max Storage for the AESU")
|
||||
.getInt();
|
||||
|
||||
|
||||
// Charge
|
||||
IronDrillCharge = config
|
||||
.get(CATEGORY_POWER, "IronDrill MaxCharge", 10000, "Set the max charge for the iron drill").getInt();
|
||||
|
||||
.get(CATEGORY_POWER, "IronDrill MaxCharge", 10000, "Set the max charge for the iron drill")
|
||||
.getInt();
|
||||
|
||||
DiamondDrillCharge = config
|
||||
.get(CATEGORY_POWER, "DiamondDrill MaxCharge", 100000, "Set the max charge for the diamond drill")
|
||||
.getInt();
|
||||
|
||||
|
||||
AdvancedDrillCharge = config
|
||||
.get(CATEGORY_POWER, "AdvancedDrill MaxCharge", 1000000, "Set the max charge for the advanced drill")
|
||||
.getInt();
|
||||
|
@ -228,23 +224,26 @@ public class ConfigTechReborn
|
|||
IronChainsawCharge = config
|
||||
.get(CATEGORY_POWER, "IronChainsaw MaxCharge", 10000, "Set the max charge for the iron chainsaw")
|
||||
.getInt();
|
||||
|
||||
|
||||
DiamondChainsawCharge = config
|
||||
.get(CATEGORY_POWER, "DiamondChainsaw MaxCharge", 100000, "Set the max charge for the diamond chainsaw")
|
||||
.getInt();
|
||||
|
||||
AdvancedChainsawCharge = config.get(CATEGORY_POWER, "AdvancedChainsaw MaxCharge", 1000000,
|
||||
"Set the max charge for the advanced chainsaw").getInt();
|
||||
|
||||
AdvancedChainsawCharge = config
|
||||
.get(CATEGORY_POWER, "AdvancedChainsaw MaxCharge", 1000000, "Set the max charge for the advanced chainsaw")
|
||||
.getInt();
|
||||
|
||||
IronJackhammerCharge = config
|
||||
.get(CATEGORY_POWER, "IronJackhammer MaxCharge", 10000, "Set the max charge for the iron jackhammer")
|
||||
.getInt();
|
||||
|
||||
SteelJackhammerCharge = config.get(CATEGORY_POWER, "AdvancedJackhammer MaxCharge", 20000,
|
||||
"Set the max charge for the advanced jackhammer").getInt();
|
||||
|
||||
DiamondJackhammerCharge = config.get(CATEGORY_POWER, "DiamondJackhammer MaxCharge", 100000,
|
||||
"Set the max charge for the diamond jackhammer").getInt();
|
||||
|
||||
SteelJackhammerCharge = config
|
||||
.get(CATEGORY_POWER, "AdvancedJackhammer MaxCharge", 20000, "Set the max charge for the advanced jackhammer")
|
||||
.getInt();
|
||||
|
||||
DiamondJackhammerCharge = config
|
||||
.get(CATEGORY_POWER, "DiamondJackhammer MaxCharge", 100000, "Set the max charge for the diamond jackhammer")
|
||||
.getInt();
|
||||
|
||||
LapotronPackCharge = config
|
||||
.get(CATEGORY_POWER, "LapotronPack MaxCharge", 100000000, "Set the max charge for the LapotronPack")
|
||||
|
@ -288,31 +287,32 @@ public class ConfigTechReborn
|
|||
farmEu = config.get(CATEGORY_POWER, "farmeu", 32, "").getInt();
|
||||
|
||||
// Tier
|
||||
IronDrillTier = config.get(CATEGORY_POWER, "IronDrill Tier", 2, "Set the Tier of the iron drill").getInt();
|
||||
|
||||
IronDrillTier = config.get(CATEGORY_POWER, "IronDrill Tier", 2, "Set the Tier of the iron drill")
|
||||
.getInt();
|
||||
|
||||
DiamondDrillTier = config.get(CATEGORY_POWER, "DiamondDrill Tier", 2, "Set the Tier of the diamond drill")
|
||||
.getInt();
|
||||
|
||||
|
||||
AdvancedDrillTier = config.get(CATEGORY_POWER, "AdvancedDrill Tier", 2, "Set the Tier of the advanced drill")
|
||||
.getInt();
|
||||
|
||||
IronChainsawTier = config.get(CATEGORY_POWER, "IronChainsaw Tier", 2, "Set the Tier of the iron chainsaw")
|
||||
.getInt();
|
||||
|
||||
DiamondChainsawTier = config
|
||||
.get(CATEGORY_POWER, "DiamondChainsaw Tier", 2, "Set the Tier of the diamond chainsaw").getInt();
|
||||
|
||||
AdvancedChainsawTier = config
|
||||
.get(CATEGORY_POWER, "AdvancedChainsaw Tier", 2, "Set the Tier of the advanced chainsaw").getInt();
|
||||
|
||||
DiamondChainsawTier = config.get(CATEGORY_POWER, "DiamondChainsaw Tier", 2, "Set the Tier of the diamond chainsaw")
|
||||
.getInt();
|
||||
|
||||
AdvancedChainsawTier = config.get(CATEGORY_POWER, "AdvancedChainsaw Tier", 2, "Set the Tier of the advanced chainsaw")
|
||||
.getInt();
|
||||
|
||||
IronJackhammerTier = config.get(CATEGORY_POWER, "IronJackhammer Tier", 2, "Set the Tier of the iron jackhammer")
|
||||
.getInt();
|
||||
|
||||
DiamondJackhammerTier = config
|
||||
.get(CATEGORY_POWER, "DiamondJackhammer Tier", 2, "Set the Tier of the diamond jackhammer").getInt();
|
||||
|
||||
SteelJackhammerTier = config
|
||||
.get(CATEGORY_POWER, "AdvancedJackhammer Tier", 2, "Set the Tier of the advanced jackhammer").getInt();
|
||||
|
||||
DiamondJackhammerTier = config.get(CATEGORY_POWER, "DiamondJackhammer Tier", 2, "Set the Tier of the diamond jackhammer")
|
||||
.getInt();
|
||||
|
||||
SteelJackhammerTier = config.get(CATEGORY_POWER, "AdvancedJackhammer Tier", 2, "Set the Tier of the advanced jackhammer")
|
||||
.getInt();
|
||||
|
||||
LapotronPackTier = config.get(CATEGORY_POWER, "LapotronPack Tier", 2, "Set the Tier of the LapotronPack")
|
||||
.getInt();
|
||||
|
@ -496,12 +496,16 @@ public class ConfigTechReborn
|
|||
oreUnifer = config.get(CATEGORY_INTEGRATION, "OreUnifer", false, "change all ores int TechReborn Ores")
|
||||
.getBoolean(false);
|
||||
|
||||
UninsulatedElectocutionDamage = config.get(CATEGORY_WORLD, "Uninsulated Electocution Damage", true,
|
||||
"Damage entities on contact with uninsulated cables").getBoolean(true);
|
||||
UninsulatedElectocutionSound = config.get(CATEGORY_WORLD, "Uninsulated Electocution Sound", true,
|
||||
"Play sound on contact with uninsulated cables").getBoolean(true);
|
||||
UninsulatedElectocutionParticle = config.get(CATEGORY_WORLD, "Uninsulated Electocution Particle", true,
|
||||
"Spawn particles on contact with uninsulated cables").getBoolean(true);
|
||||
|
||||
UninsulatedElectocutionDamage = config
|
||||
.get(CATEGORY_WORLD, "Uninsulated Electocution Damage", true, "Damage entities on contact with uninsulated cables")
|
||||
.getBoolean(true);
|
||||
UninsulatedElectocutionSound = config
|
||||
.get(CATEGORY_WORLD, "Uninsulated Electocution Sound", true, "Play sound on contact with uninsulated cables")
|
||||
.getBoolean(true);
|
||||
UninsulatedElectocutionParticle = config
|
||||
.get(CATEGORY_WORLD, "Uninsulated Electocution Particle", true, "Spawn particles on contact with uninsulated cables")
|
||||
.getBoolean(true);
|
||||
|
||||
scrapboxDispenser = config
|
||||
.get(CATEGORY_WORLD, "Scrapboxes in Dispenser", true, "Allow scrapbox to be opened via dispenser")
|
||||
|
@ -511,6 +515,7 @@ public class ConfigTechReborn
|
|||
.get(CATEGORY_CRAFTING, "Expensive Watermill", true, "Allow TechReborn to change the Watermill recipe")
|
||||
.getBoolean(true);
|
||||
|
||||
|
||||
// Integration
|
||||
AllowBOPRecipes = config.get(CATEGORY_INTEGRATION, "Allow Bop Recipes", true, "Add BOP suport")
|
||||
.getBoolean(true);
|
||||
|
@ -521,8 +526,7 @@ public class ConfigTechReborn
|
|||
AllowNaturaRecipes = config.get(CATEGORY_INTEGRATION, "Allow Natura Recipes", true, "Add Natura suport")
|
||||
.getBoolean(true);
|
||||
|
||||
if (config.hasChanged())
|
||||
{
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package techreborn.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
@ -13,182 +10,198 @@ import net.minecraftforge.fml.client.config.GuiConfigEntries;
|
|||
import net.minecraftforge.fml.client.config.GuiConfigEntries.CategoryEntry;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
|
||||
public class TechRebornConfigGui extends GuiConfig
|
||||
{
|
||||
public TechRebornConfigGui(GuiScreen top)
|
||||
{
|
||||
super(top, getConfigCategories(), "TechReborn", false, false,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
private static List<IConfigElement> getConfigCategories()
|
||||
{
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
list.add(
|
||||
new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.general"),
|
||||
"tr.configgui.category.trGeneral", TRGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.world"),
|
||||
"tr.configgui.category.trWorld", TRWORLD.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.power"),
|
||||
"tr.configgui.category.trPower", TRPOWER.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(
|
||||
I18n.translateToLocal("config.techreborn.category.crafting"), "tr.configgui.category.trCrafting",
|
||||
TRCRAFTING.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.uu"),
|
||||
"tr.configgui.category.truu", TRUU.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.emc"),
|
||||
"tr.configgui.category.tremc", TREMC.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(
|
||||
I18n.translateToLocal("config.techreborn.category.integration"), "tr.configgui.category.treinter",
|
||||
TRINT.class));
|
||||
public class TechRebornConfigGui extends GuiConfig {
|
||||
public TechRebornConfigGui(GuiScreen top) {
|
||||
super(top, getConfigCategories(), "TechReborn", false, false, GuiConfig
|
||||
.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
private static List<IConfigElement> getConfigCategories() {
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.general"),
|
||||
"tr.configgui.category.trGeneral", TRGeneral.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.world"),
|
||||
"tr.configgui.category.trWorld", TRWORLD.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.power"),
|
||||
"tr.configgui.category.trPower", TRPOWER.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.crafting"),
|
||||
"tr.configgui.category.trCrafting", TRCRAFTING.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.uu"),
|
||||
"tr.configgui.category.truu", TRUU.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.emc"),
|
||||
"tr.configgui.category.tremc", TREMC.class));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n
|
||||
.translateToLocal("config.techreborn.category.integration"),
|
||||
"tr.configgui.category.treinter", TRINT.class));
|
||||
|
||||
public static class TRGeneral extends CategoryEntry
|
||||
{
|
||||
return list;
|
||||
}
|
||||
|
||||
public TRGeneral(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
public static class TRGeneral extends CategoryEntry {
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(Configuration.CATEGORY_GENERAL)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
public TRGeneral(GuiConfig owningScreen,
|
||||
GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// World
|
||||
public static class TRWORLD extends CategoryEntry
|
||||
{
|
||||
public TRWORLD(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
|
||||
{
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen() {
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config
|
||||
.getCategory(Configuration.CATEGORY_GENERAL)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(ConfigTechReborn.CATEGORY_WORLD)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
// World
|
||||
public static class TRWORLD extends CategoryEntry {
|
||||
public TRWORLD(GuiConfig owningScreen,
|
||||
GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// 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_WORLD)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@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()));
|
||||
}
|
||||
}
|
||||
// Power
|
||||
public static class TRPOWER extends CategoryEntry {
|
||||
public TRPOWER(GuiConfig owningScreen,
|
||||
GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// Crafting
|
||||
public static class TRCRAFTING extends CategoryEntry
|
||||
{
|
||||
public TRCRAFTING(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()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(ConfigTechReborn.CATEGORY_CRAFTING)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
// Crafting
|
||||
public static class TRCRAFTING extends CategoryEntry {
|
||||
public TRCRAFTING(GuiConfig owningScreen,
|
||||
GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// Crafting
|
||||
public static class TRUU extends CategoryEntry
|
||||
{
|
||||
public TRUU(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_CRAFTING)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(ConfigTechReborn.CATEGORY_UU)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
// Crafting
|
||||
public static class TRUU extends CategoryEntry {
|
||||
public TRUU(GuiConfig owningScreen,
|
||||
GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// Emc
|
||||
public static class TREMC extends CategoryEntry
|
||||
{
|
||||
public TREMC(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_UU)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(ConfigTechReborn.CATEGORY_EMC)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
// Emc
|
||||
public static class TREMC extends CategoryEntry {
|
||||
public TREMC(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
|
||||
super(owningScreen, owningEntryList, configElement);
|
||||
}
|
||||
|
||||
// Mod Integration
|
||||
public static class TRINT extends CategoryEntry
|
||||
{
|
||||
public TRINT(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_EMC)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiScreen buildChildScreen()
|
||||
{
|
||||
return new GuiConfig(this.owningScreen,
|
||||
(new ConfigElement(ConfigTechReborn.config.getCategory(ConfigTechReborn.CATEGORY_INTEGRATION)))
|
||||
.getChildElements(),
|
||||
this.owningScreen.modID, Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
|
||||
}
|
||||
}
|
||||
//Mod Integration
|
||||
public static class TRINT extends CategoryEntry {
|
||||
public TRINT(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_INTEGRATION)))
|
||||
.getChildElements(), this.owningScreen.modID,
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
this.configElement.requiresWorldRestart()
|
||||
|| this.owningScreen.allRequireWorldRestart,
|
||||
this.configElement.requiresMcRestart()
|
||||
|| this.owningScreen.allRequireMcRestart,
|
||||
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config
|
||||
.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +1,31 @@
|
|||
package techreborn.config;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.fml.client.IModGuiFactory;
|
||||
|
||||
public class TechRebornGUIFactory implements IModGuiFactory
|
||||
{
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance)
|
||||
{
|
||||
import java.util.Set;
|
||||
|
||||
}
|
||||
public class TechRebornGUIFactory implements IModGuiFactory {
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass()
|
||||
{
|
||||
return TechRebornConfigGui.class;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return TechRebornConfigGui.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(
|
||||
RuntimeOptionCategoryElement element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue