Auto Format code

This commit is contained in:
modmuss50 2016-10-08 20:46:16 +01:00
parent 112b1657cf
commit 796df6c055
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
503 changed files with 12260 additions and 16291 deletions

View file

@ -4,8 +4,7 @@ import net.minecraftforge.common.config.Configuration;
import java.io.File;
public class ConfigTechReborn
{
public class ConfigTechReborn {
public static String CATEGORY_WORLD = "world";
public static String CATEGORY_POWER = "power";
public static String CATEGORY_CRAFTING = "crafting";
@ -151,8 +150,7 @@ public class ConfigTechReborn
public static Configuration config;
private static ConfigTechReborn instance = null;
private ConfigTechReborn(File configFile)
{
private ConfigTechReborn(File configFile) {
config = new Configuration(configFile);
config.load();
@ -162,8 +160,7 @@ public class ConfigTechReborn
}
public static ConfigTechReborn initialize(File configFile)
{
public static ConfigTechReborn initialize(File configFile) {
if (instance == null)
instance = new ConfigTechReborn(configFile);
@ -173,153 +170,150 @@ 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);
.get(CATEGORY_WORLD, "Rubber Sapling Loot", true, "Allow Rubber Saplings to generate in loot chests")
.getBoolean(true);
CopperIngotsLoot = config
.get(CATEGORY_WORLD, "Copper Ingots Loot", true, "Allow Copper Ingots to generate in loot chests")
.getBoolean(true);
.get(CATEGORY_WORLD, "Copper Ingots Loot", true, "Allow Copper Ingots to generate in loot chests")
.getBoolean(true);
TinIngotsLoot = config
.get(CATEGORY_WORLD, "Tin Ingots Loot", true, "Allow Tin Ingots to generate in loot chests")
.getBoolean(true);
.get(CATEGORY_WORLD, "Tin Ingots Loot", true, "Allow Tin Ingots to generate in loot chests")
.getBoolean(true);
SteelIngotsLoot = config
.get(CATEGORY_WORLD, "Steel Ingots Loot", true, "Allow Steel Ingots to generate in loot chests")
.getBoolean(true);
.get(CATEGORY_WORLD, "Steel Ingots Loot", true, "Allow Steel Ingots to generate in loot chests")
.getBoolean(true);
veinOres = config
.get(CATEGORY_WORLD, "Custom Ore veins", false, "Use the new style GT vein ore generation - game restart required")
.getBoolean(false);
.get(CATEGORY_WORLD, "Custom Ore veins", false, "Use the new style GT vein ore generation - game restart required")
.getBoolean(false);
FortuneSecondaryOreMultiplierPerLevel = config.get(CATEGORY_WORLD, "FortuneSecondaryOreMultiplierPerLevel", 0.5,
"FortuneSecondaryOreMultiplierPerLevel").getDouble();
"FortuneSecondaryOreMultiplierPerLevel").getDouble();
// Power
LightningRodChance = config
.get(CATEGORY_POWER, "Lightning Rod light struck chance", 24, "Set the chance of light strike (0-70)", 0, 70)
.getInt();
.get(CATEGORY_POWER, "Lightning Rod light struck chance", 24, "Set the chance of light strike (0-70)", 0, 70)
.getInt();
ThermalGeneratorOutput = config
.get(CATEGORY_POWER, "ThermalGenerator Max Output", 60, "Set the max output for the ThermalGenerator")
.getInt();
.get(CATEGORY_POWER, "ThermalGenerator Max Output", 60, "Set the max output for the ThermalGenerator")
.getInt();
DragonEggSiphonerOutput = config
.get(CATEGORY_POWER, "DragoneggSiphoner Max Output", 30, "Set the max output for the DragonEggSiphoner")
.getInt();
.get(CATEGORY_POWER, "DragoneggSiphoner Max Output", 30, "Set the max output for the DragonEggSiphoner")
.getInt();
CentrifugeInputTick = config
.get(CATEGORY_POWER, "Centrifuge Max Tick", 30, "Set the max power the Centrifuge uses per tick")
.getInt();
.get(CATEGORY_POWER, "Centrifuge Max Tick", 30, "Set the max power the Centrifuge uses per tick")
.getInt();
HeatGeneratorOutput = config
.get(CATEGORY_POWER, "HeatGenerator Max Output", 30, "Set the max output for the HeatGenerator")
.getInt();
.get(CATEGORY_POWER, "HeatGenerator Max Output", 30, "Set the max output for the HeatGenerator")
.getInt();
AesuMaxOutput = config.get(CATEGORY_POWER, "AESU Max Output", 30, "Set the max output for the AESU").getInt();
AesuMaxStorage = config.get(CATEGORY_POWER, "AESU Max Storage", 30, "Set the max Storage for the AESU")
.getInt();
.getInt();
pumpExtractEU = config.get(CATEGORY_POWER, "Pump extract eu", 20, "How mutch eu should the pump use to extract the fluid")
.getInt();
.getInt();
//Transformers
LVTransformerMaxInput = config.get(CATEGORY_POWER, "LV Transformer Max Input", 128, "Set the max input for the LV Trasnformer")
.getInt();
.getInt();
LVTransformerMaxOutput = config.get(CATEGORY_POWER, "LV Transformer Max Output", 32, "Set the max output for the LV Trasnformer")
.getInt();
.getInt();
MVTransformerMaxInput = config.get(CATEGORY_POWER, "MV Transformer Max Input", 512, "Set the max input for the MV Trasnformer")
.getInt();
.getInt();
MVTransformerMaxOutput = config.get(CATEGORY_POWER, "MV Transformer Max Output", 128, "Set the max output for the MV Trasnformer")
.getInt();
.getInt();
HVTransformerMaxInput = config.get(CATEGORY_POWER, "HV Transformer Max Input", 2048, "Set the max input for the HV Trasnformer")
.getInt();
.getInt();
HVTransformerMaxOutput = config.get(CATEGORY_POWER, "HV Transformer Max Output", 512, "Set the max output for the HV Trasnformer")
.getInt();
.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();
.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();
.get(CATEGORY_POWER, "AdvancedDrill MaxCharge", 1000000, "Set the max charge for the advanced drill")
.getInt();
IronChainsawCharge = config
.get(CATEGORY_POWER, "IronChainsaw MaxCharge", 10000, "Set the max charge for the iron chainsaw")
.getInt();
.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();
.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();
"Set the max charge for the advanced chainsaw").getInt();
AdvancedJackhammerCharge = config
.get(CATEGORY_POWER, "AdvancedJackhammer MaxCharge", 100000, "Set the max charge for the advanced jackhammer")
.getInt();
.get(CATEGORY_POWER, "AdvancedJackhammer MaxCharge", 100000, "Set the max charge for the advanced jackhammer")
.getInt();
SteelJackhammerCharge = config.get(CATEGORY_POWER, "AdvancedJackhammer MaxCharge", 10000,
"Set the max charge for the steel jackhammer").getInt();
"Set the max charge for the steel jackhammer").getInt();
DiamondJackhammerCharge = config.get(CATEGORY_POWER, "DiamondJackhammer MaxCharge", 20000,
"Set the max charge for the diamond jackhammer").getInt();
"Set the max charge for the diamond jackhammer").getInt();
LapotronPackCharge = config
.get(CATEGORY_POWER, "LapotronPack MaxCharge", 100000000, "Set the max charge for the LapotronPack")
.getInt();
.get(CATEGORY_POWER, "LapotronPack MaxCharge", 100000000, "Set the max charge for the LapotronPack")
.getInt();
LapotronicOrbMaxCharge = config
.get(CATEGORY_POWER, "LapotronicOrb MaxCharge", 10000000, "Set the max charge for the LapotronicOrb")
.getInt();
.get(CATEGORY_POWER, "LapotronicOrb MaxCharge", 10000000, "Set the max charge for the LapotronicOrb")
.getInt();
LithiumBatpackCharge = config
.get(CATEGORY_POWER, "LithiumBatpack MaxCharge", 4000000, "Set the max charge for the LithiumBatpack")
.getInt();
.get(CATEGORY_POWER, "LithiumBatpack MaxCharge", 4000000, "Set the max charge for the LithiumBatpack")
.getInt();
OmniToolCharge = config.get(CATEGORY_POWER, "OmniTool MaxCharge", 20000, "Set the max charge for the OmniTool")
.getInt();
.getInt();
RockCutterCharge = config
.get(CATEGORY_POWER, "RockCutter MaxCharge", 10000, "Set the max charge for the RockCutter").getInt();
.get(CATEGORY_POWER, "RockCutter MaxCharge", 10000, "Set the max charge for the RockCutter").getInt();
CloakingDeviceCharge = config
.get(CATEGORY_POWER, "CloakingDevice MaxCharge", 10000000, "Set the max charge for the CloakingDevice")
.getInt();
.get(CATEGORY_POWER, "CloakingDevice MaxCharge", 10000000, "Set the max charge for the CloakingDevice")
.getInt();
CentrifugeCharge = config
.get(CATEGORY_POWER, "Centrifuge MaxCharge", 1000000, "Set the max charge for the Centrifuge").getInt();
.get(CATEGORY_POWER, "Centrifuge MaxCharge", 1000000, "Set the max charge for the Centrifuge").getInt();
ThermalGeneratorCharge = config.get(CATEGORY_POWER, "ThermalGenerator MaxCharge", 1000000,
"Set the max charge for the ThermalGenerator").getInt();
"Set the max charge for the ThermalGenerator").getInt();
AverageEuOutTickTime = config.get(CATEGORY_POWER, "config.techreborn.AverageEuOutTickTime", 100,
"config.techreborn.AverageEuOutTickTime.tooltip").getInt();
"config.techreborn.AverageEuOutTickTime.tooltip").getInt();
LesuStoragePerBlock = config.get(CATEGORY_POWER, "LESU Storage Block Amount", 1000000,
"The Amount of energy storage added per Storage block").getInt();
"The Amount of energy storage added per Storage block").getInt();
BaseLesuOutput = config.get(CATEGORY_POWER, "LESU base output", 16, "The output of the LESU befor upgrades")
.getInt();
.getInt();
ExtraOutputPerLesuBlock = config.get(CATEGORY_POWER, "Extra output on Storage Blocks", 8, "").getInt();
@ -329,253 +323,252 @@ public class ConfigTechReborn
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();
.getInt();
AdvancedDrillTier = config.get(CATEGORY_POWER, "AdvancedDrill Tier", 2, "Set the Tier of the advanced drill")
.getInt();
.getInt();
IronChainsawTier = config.get(CATEGORY_POWER, "IronChainsaw Tier", 2, "Set the Tier of the iron chainsaw")
.getInt();
.getInt();
DiamondChainsawTier = config
.get(CATEGORY_POWER, "DiamondChainsaw Tier", 2, "Set the Tier of the diamond chainsaw").getInt();
.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();
.get(CATEGORY_POWER, "AdvancedChainsaw Tier", 2, "Set the Tier of the advanced chainsaw").getInt();
AdvancedJackhammerTier = config.get(CATEGORY_POWER, "AdvancedJackhammer Tier", 2, "Set the Tier of the advanced jackhammer")
.getInt();
.getInt();
DiamondJackhammerTier = config
.get(CATEGORY_POWER, "DiamondJackhammer Tier", 2, "Set the Tier of the diamond jackhammer").getInt();
.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();
.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();
.getInt();
LapotronicOrbTier = config.get(CATEGORY_POWER, "LapotronicOrb Tier", 2, "Set the Tier of the LapotronicOrb")
.getInt();
.getInt();
LithiumBatpackTier = config.get(CATEGORY_POWER, "LithiumBatpack Tier", 3, "Set the Tier of the LithiumBatpack")
.getInt();
.getInt();
OmniToolTier = config.get(CATEGORY_POWER, "OmniTool Tier", 3, "Set the Tier of the OmniTool").getInt();
RockCutterTier = config.get(CATEGORY_POWER, "RockCutter Tier", 2, "Set the Tier of the RockCutter").getInt();
CloakingDeviceTier = config.get(CATEGORY_POWER, "CloakingDevice Tier", 2, "Set the Tier of the CloakingDevice")
.getInt();
.getInt();
CloakingDeviceEUTick = config.get(CATEGORY_POWER, "CloakingDevice EUTick", 10000, "CloakingDevice EUTick")
.getInt();
.getInt();
CentrifugeTier = config.get(CATEGORY_POWER, "Centrifuge Tier", 1, "Set the Tier of the Centrifuge").getInt();
ThermalGeneratorTier = config
.get(CATEGORY_POWER, "ThermalGenerator Tier", 1, "Set the Tier of the ThermalGenerator").getInt();
.get(CATEGORY_POWER, "ThermalGenerator Tier", 1, "Set the Tier of the ThermalGenerator").getInt();
//Features
FreqTransmitterChat = config
.get(CATEGORY_FEATURES, "Frequency Transmitter Chat messages", true, "Allow Frequency Transmitter chat messages")
.getBoolean(true);
.get(CATEGORY_FEATURES, "Frequency Transmitter Chat messages", true, "Allow Frequency Transmitter chat messages")
.getBoolean(true);
FreqTransmitterTooltip = config
.get(CATEGORY_FEATURES, "Frequency Transmitter tooltips", true, "Allow Frequency Transmitter to display tooltip info")
.getBoolean(true);
.get(CATEGORY_FEATURES, "Frequency Transmitter tooltips", true, "Allow Frequency Transmitter to display tooltip info")
.getBoolean(true);
NanosaberChat = config
.get(CATEGORY_FEATURES, "Nanosaber Chat messages", true, "Allow Nanosaber chat messages")
.getBoolean(true);
.get(CATEGORY_FEATURES, "Nanosaber Chat messages", true, "Allow Nanosaber chat messages")
.getBoolean(true);
enableGemArmorAndTools = config.get(CATEGORY_FEATURES, "Gem tools and armor", true, "Should the gem tools and armor be added to the game").getBoolean(true);
// Crafting
ExpensiveMacerator = config
.get(CATEGORY_CRAFTING, "Expensive Macerator", true, "Allow TechReborn to change the Macerator recipe")
.getBoolean(true);
.get(CATEGORY_CRAFTING, "Expensive Macerator", true, "Allow TechReborn to change the Macerator recipe")
.getBoolean(true);
ExpensiveDrill = config
.get(CATEGORY_CRAFTING, "Expensive Drill", true, "Allow TechReborn to change the Drill recipe")
.getBoolean(true);
.get(CATEGORY_CRAFTING, "Expensive Drill", true, "Allow TechReborn to change the Drill recipe")
.getBoolean(true);
ExpensiveDiamondDrill = config.get(CATEGORY_CRAFTING, "Expensive DiamondDrill", true,
"Allow TechReborn to change the DiamondDrill recipe").getBoolean(true);
"Allow TechReborn to change the DiamondDrill recipe").getBoolean(true);
ExpensiveSolar = config.get(CATEGORY_CRAFTING, "Expensive Solarpanels", true,
"Allow TechReborn to change the Solarpanels recipe").getBoolean(true);
"Allow TechReborn to change the Solarpanels recipe").getBoolean(true);
ExpensiveWatermill = config
.get(CATEGORY_CRAFTING, "Expensive Watermill", true, "Allow TechReborn to change the Watermill recipe")
.getBoolean(true);
.get(CATEGORY_CRAFTING, "Expensive Watermill", true, "Allow TechReborn to change the Watermill recipe")
.getBoolean(true);
ExpensiveWindmill = config
.get(CATEGORY_CRAFTING, "Expensive Windmill", true, "Allow TechReborn to change the Windmill recipe")
.getBoolean(true);
.get(CATEGORY_CRAFTING, "Expensive Windmill", true, "Allow TechReborn to change the Windmill recipe")
.getBoolean(true);
// Uu
HideUuRecipes = config.get(CATEGORY_UU, "Hide UU Recipes", true, "Hide UU Recipes from JEI/NEI")
.getBoolean(true);
.getBoolean(true);
UUrecipesIridiamOre = config
.get(CATEGORY_UU, "UUrecipe IridiamOre", true, "Allow Iridium Ore to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe IridiamOre", true, "Allow Iridium Ore to be crafted with UU")
.getBoolean(true);
UUrecipesWood = config.get(CATEGORY_UU, "UUrecipe Wood", true, "Allow Wood to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesStone = config.get(CATEGORY_UU, "UUrecipe Stone", true, "Allow Stone to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesSnowBlock = config
.get(CATEGORY_UU, "UUrecipe SnowBlock", true, "Allow Snow Blocks to be crafted with UU").getBoolean(true);
.get(CATEGORY_UU, "UUrecipe SnowBlock", true, "Allow Snow Blocks to be crafted with UU").getBoolean(true);
UUrecipesGrass = config.get(CATEGORY_UU, "UUrecipe Grass", true, "Allow Grass to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesObsidian = config.get(CATEGORY_UU, "UUrecipe Obsidian", true, "Allow Obsidian to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesGlass = config.get(CATEGORY_UU, "UUrecipe Glass", true, "Allow Glass to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesWater = config.get(CATEGORY_UU, "UUrecipe Water", true, "Allow Water to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesLava = config.get(CATEGORY_UU, "UUrecipe Lava", true, "Allow Lava to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesCocoa = config.get(CATEGORY_UU, "UUrecipe Cocoa", true, "Allow Cocoa to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesGlowstoneBlock = config
.get(CATEGORY_UU, "UUrecipe GlowstoneBlock", true, "Allow Glowstone Blocks to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe GlowstoneBlock", true, "Allow Glowstone Blocks to be crafted with UU")
.getBoolean(true);
UUrecipesCactus = config.get(CATEGORY_UU, "UUrecipe Cactus", true, "Allow Cactus to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesSugarCane = config
.get(CATEGORY_UU, "UUrecipe SugarCane", true, "Allow SugarCane to be crafted with UU").getBoolean(true);
.get(CATEGORY_UU, "UUrecipe SugarCane", true, "Allow SugarCane to be crafted with UU").getBoolean(true);
UUrecipesVine = config.get(CATEGORY_UU, "UUrecipe Vine", true, "Allow Vines to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesSnowBall = config.get(CATEGORY_UU, "UUrecipe SnowBall", true, "Allow SnowBall to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipeslilypad = config.get(CATEGORY_UU, "UUrecipe lilypad", true, "Allow lilypads to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesBone = config.get(CATEGORY_UU, "UUrecipe Bone", true, "Allow Bones to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesFeather = config.get(CATEGORY_UU, "UUrecipe Feather", true, "Allow Feathers to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesInk = config.get(CATEGORY_UU, "UUrecipe Ink", true, "Allow Ink to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesEnderPearl = config
.get(CATEGORY_UU, "UUrecipe EnderPearl", true, "Allow EnderPearls to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe EnderPearl", true, "Allow EnderPearls to be crafted with UU")
.getBoolean(true);
UUrecipesCoal = config.get(CATEGORY_UU, "UUrecipe Coal", true, "Allow Coal to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesIronOre = config.get(CATEGORY_UU, "UUrecipe IronOre", true, "Allow Iron Ore to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesIronDust = config.get(CATEGORY_UU, "UUrecipe IronDust", true, "Allow Iron Dust to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesGoldOre = config.get(CATEGORY_UU, "UUrecipe GoldOre", true, "Allow Gold Ore to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesGoldDust = config.get(CATEGORY_UU, "UUrecipe GoldDust", true, "Allow Gold Dust to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesRedStone = config.get(CATEGORY_UU, "UUrecipe RedStone", true, "Allow Redstone to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesLapis = config.get(CATEGORY_UU, "UUrecipe Lapis", true, "Allow Lapis to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesEmeraldOre = config
.get(CATEGORY_UU, "UUrecipe EmeraldOre", true, "Allow EmeraldOre to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe EmeraldOre", true, "Allow EmeraldOre to be crafted with UU")
.getBoolean(true);
UUrecipesEmerald = config.get(CATEGORY_UU, "UUrecipe Emerald", true, "Allow Emerald to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesDiamond = config.get(CATEGORY_UU, "UUrecipe Diamond", true, "Allow Diamond to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesResin = config.get(CATEGORY_UU, "UUrecipe Resin", true, "Allow Resin to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesTinDust = config.get(CATEGORY_UU, "UUrecipe TinDust", true, "Allow TinDust to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesCopperDust = config
.get(CATEGORY_UU, "UUrecipe CopperDust", true, "Allow CopperDust to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe CopperDust", true, "Allow CopperDust to be crafted with UU")
.getBoolean(true);
UUrecipesLeadDust = config.get(CATEGORY_UU, "UUrecipe LeadDust", true, "Allow LeadDust to be crafted with UU")
.getBoolean(true);
.getBoolean(true);
UUrecipesPlatinumDust = config
.get(CATEGORY_UU, "UUrecipe PlatinumDust", true, "Allow PlatinumDust to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe PlatinumDust", true, "Allow PlatinumDust to be crafted with UU")
.getBoolean(true);
UUrecipesTungstenDust = config
.get(CATEGORY_UU, "UUrecipe TungstenDust", true, "Allow TungstenDust to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe TungstenDust", true, "Allow TungstenDust to be crafted with UU")
.getBoolean(true);
UUrecipesTitaniumDust = config
.get(CATEGORY_UU, "UUrecipe TitaniumDust", true, "Allow TitaniumDust to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe TitaniumDust", true, "Allow TitaniumDust to be crafted with UU")
.getBoolean(true);
UUrecipesAluminumDust = config
.get(CATEGORY_UU, "UUrecipe AluminumDust", true, "Allow AluminumDust to be crafted with UU")
.getBoolean(true);
.get(CATEGORY_UU, "UUrecipe AluminumDust", true, "Allow AluminumDust to be crafted with UU")
.getBoolean(true);
ShowChargeHud = config.get(CATEGORY_POWER, "Show Charge hud", true, "Show Charge hud (ClientSideOnly)")
.getBoolean(true);
.getBoolean(true);
UseConnectedTextures = config.get(CATEGORY_INTEGRATION, "Render Conected Textures", true,
"Render Conected Textures (Client Side Only)").getBoolean(true);
"Render Conected Textures (Client Side Only)").getBoolean(true);
OreUnifer = config.get(CATEGORY_INTEGRATION, "OreUnifer", false, "Change all ores into TechReborn Ores")
.getBoolean(false);
.getBoolean(false);
UninsulatedElectocutionDamage = config.get(CATEGORY_WORLD, "Uninsulated Electrocution Damage", true,
"Damage entities on contact with uninsulated cables").getBoolean(true);
"Damage entities on contact with uninsulated cables").getBoolean(true);
UninsulatedElectocutionSound = config.get(CATEGORY_WORLD, "Uninsulated Electrocution Sound", true,
"Play sound on contact with uninsulated cables").getBoolean(true);
"Play sound on contact with uninsulated cables").getBoolean(true);
UninsulatedElectocutionParticle = config.get(CATEGORY_WORLD, "Uninsulated Electrocution Particle", true,
"Spawn particles on contact with uninsulated cables").getBoolean(true);
"Spawn particles on contact with uninsulated cables").getBoolean(true);
ScrapboxDispenser = config
.get(CATEGORY_WORLD, "Scrapboxes in Dispenser", true, "Allow scrapboxes to be opened via dispenser")
.getBoolean(true);
.get(CATEGORY_WORLD, "Scrapboxes in Dispenser", true, "Allow scrapboxes to be opened via dispenser")
.getBoolean(true);
ExpensiveWatermill = config
.get(CATEGORY_CRAFTING, "Expensive Watermill", true, "Allow TechReborn to change the Watermill recipe")
.getBoolean(true);
.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);
.getBoolean(true);
AllowForestryRecipes = config.get(CATEGORY_INTEGRATION, "Allow Forestry Recipes", true, "Add Forestry suport")
.getBoolean(true);
.getBoolean(true);
AllowNaturaRecipes = config.get(CATEGORY_INTEGRATION, "Allow Natura Recipes", true, "Add Natura suport")
.getBoolean(true);
.getBoolean(true);
if (config.hasChanged())
{
if (config.hasChanged()) {
config.save();
}
}

View file

@ -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,161 @@ 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)
{
import java.util.ArrayList;
import java.util.List;
public class TechRebornConfigGui extends GuiConfig {
public TechRebornConfigGui(GuiScreen top) {
super(top, getConfigCategories(), "TechReborn", false, false,
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
GuiConfig.getAbridgedConfigPath(ConfigTechReborn.config.toString()));
}
private static List<IConfigElement> getConfigCategories()
{
private static List<IConfigElement> getConfigCategories() {
List<IConfigElement> list = new ArrayList<>();
list.add(
new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.general"),
"tr.configgui.category.trGeneral", TRGeneral.class));
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));
"tr.configgui.category.trWorld", TRWORLD.class));
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.power"),
"tr.configgui.category.trPower", TRPOWER.class));
"tr.configgui.category.trPower", TRPOWER.class));
list.add(new DummyConfigElement.DummyCategoryElement(
I18n.translateToLocal("config.techreborn.category.crafting"), "tr.configgui.category.trCrafting",
TRCRAFTING.class));
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));
"tr.configgui.category.truu", TRUU.class));
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.techreborn.category.emc"),
"tr.configgui.category.tremc", TREMC.class));
"tr.configgui.category.tremc", TREMC.class));
list.add(new DummyConfigElement.DummyCategoryElement(
I18n.translateToLocal("config.techreborn.category.integration"), "tr.configgui.category.treinter",
TRINT.class));
I18n.translateToLocal("config.techreborn.category.integration"), "tr.configgui.category.treinter",
TRINT.class));
return list;
}
public static class TRGeneral extends CategoryEntry
{
public static class TRGeneral extends CategoryEntry {
public TRGeneral(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public TRGeneral(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
// World
public static class TRWORLD extends CategoryEntry
{
public TRWORLD(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TRWORLD extends CategoryEntry {
public TRWORLD(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
// Power
public static class TRPOWER extends CategoryEntry
{
public TRPOWER(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TRPOWER extends CategoryEntry {
public TRPOWER(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
// Crafting
public static class TRCRAFTING extends CategoryEntry
{
public TRCRAFTING(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TRCRAFTING extends CategoryEntry {
public TRCRAFTING(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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 TRUU extends CategoryEntry
{
public TRUU(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TRUU extends CategoryEntry {
public TRUU(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
// Emc
public static class TREMC extends CategoryEntry
{
public TREMC(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TREMC extends CategoryEntry {
public TREMC(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
// Mod Integration
public static class TRINT extends CategoryEntry
{
public TRINT(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement)
{
public static class TRINT extends CategoryEntry {
public TRINT(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement configElement) {
super(owningScreen, owningEntryList, configElement);
}
@Override
protected GuiScreen buildChildScreen()
{
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()));
(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()));
}
}
}

View file

@ -1,34 +1,29 @@
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
{
import java.util.Set;
public class TechRebornGUIFactory implements IModGuiFactory {
@Override
public void initialize(Minecraft minecraftInstance)
{
public void initialize(Minecraft minecraftInstance) {
}
@Override
public Class<? extends GuiScreen> mainConfigGuiClass()
{
public Class<? extends GuiScreen> mainConfigGuiClass() {
return TechRebornConfigGui.class;
}
@Override
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories()
{
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
return null;
}
@Override
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element)
{
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
return null;
}