forked from TAIGA/TAIGA
Added missing names and two missing textures for liquids. Reworked Configuration, did not work - still need to be fixed. Changed some Temperatures, added two additional liquids for melting.
This commit is contained in:
@@ -15,34 +15,27 @@ import java.util.List;
|
||||
public class TAIGAConfiguration {
|
||||
public static final String CATEGORY_NAME_GENERAL = "category_general";
|
||||
public static final String CATEGORY_NAME_ORE_GEN = "category_ore_gen";
|
||||
public static final String CATEGORY_NAME_ORE_VAL = "category_ore_val";
|
||||
|
||||
public static double speedFactorGeneral;
|
||||
public static double attackFactorGeneral;
|
||||
public static double durabilityFactorGeneral;
|
||||
public static double RESFAC_MIN_VALUE = 0;
|
||||
public static double RESFAC_MAX_VALUE = 9999;
|
||||
|
||||
public static double ironFactor;
|
||||
public static double titaniteFactor;
|
||||
public static double adamantiteFactor;
|
||||
public static double arcaniteFactor;
|
||||
public static double violiumFactor;
|
||||
public static double bismuthFactor;
|
||||
public static double eterniteFactor;
|
||||
public static double ignititeFactor;
|
||||
public static double karmesineFactor;
|
||||
public static double meteoriteFactor;
|
||||
public static double mindoriteFactor;
|
||||
public static double mythrilFactor;
|
||||
public static double palladiumFactor;
|
||||
public static double prometheumFactor;
|
||||
public static double tiberiumFactor;
|
||||
public static double vibraniumFactor;
|
||||
public static double rubiumFactor;
|
||||
public static double basaltFactor;
|
||||
public static double rottengroundFactor;
|
||||
public static double ligniteFactor;
|
||||
public static int IRON_VAL = 20;
|
||||
public static int TIBERIUM_VAL = 15;
|
||||
public static int PROMETHEUM_VAL = 25;
|
||||
public static int VALYRIUM_VAL = 10;
|
||||
public static int OSRAM_VAL = 1;
|
||||
public static int DURANITE_VAL = 1;
|
||||
public static int BASALT_VAL = 10;
|
||||
public static int EEZO_VAL = 3;
|
||||
public static int KARMESINE_VAL = 15;
|
||||
public static int VIBRANIUM_VAL = 10;
|
||||
public static int URU_VAL = 1;
|
||||
public static int AURORIUM_VAL = 10;
|
||||
public static int PALLADIUM_VAL = 10;
|
||||
public static int ABYSSUM_VAL = 4;
|
||||
|
||||
public static boolean ironGen;
|
||||
public static boolean ironGen = false;
|
||||
public static boolean endGen = true;
|
||||
private static Configuration config = null;
|
||||
|
||||
public static void preInit() {
|
||||
@@ -83,257 +76,83 @@ public class TAIGAConfiguration {
|
||||
* Ore generation chance multiplier
|
||||
*/
|
||||
|
||||
final boolean GENERATION_DEFAULT_VALUE = true;
|
||||
final double RESFAC_MIN_VALUE = 0;
|
||||
final double RESFAC_MAX_VALUE = 9999;
|
||||
final double RESFAC_DEFAULT_VALUE = 1.0;
|
||||
|
||||
Property slagIronSwitch = config.get(CATEGORY_NAME_GENERAL, "SlagIron Switch", GENERATION_DEFAULT_VALUE);
|
||||
slagIronSwitch.setComment("Switch ore on/off");
|
||||
slagIronSwitch.setLanguageKey("gui.taiga_configuration.gen_slagiron");
|
||||
Property slagGoldSwitch = config.get(CATEGORY_NAME_GENERAL, "SlagGold Switch", GENERATION_DEFAULT_VALUE);
|
||||
slagGoldSwitch.setComment("Switch ore on/off");
|
||||
slagGoldSwitch.setLanguageKey("gui.taiga_configuration.gen_slaggold");
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Iron Switch", GENERATION_DEFAULT_VALUE);
|
||||
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Iron Switch", ironGen);
|
||||
ironSwitch.setComment("Switch ore on/off");
|
||||
ironSwitch.setLanguageKey("gui.taiga_configuration.gen_iron");
|
||||
|
||||
Property endSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Endstone Switch", endGen);
|
||||
endSwitch.setComment("Switch extra End on/off");
|
||||
endSwitch.setLanguageKey("gui.taiga_configuration.gen_end");
|
||||
|
||||
/*
|
||||
Stuff which probably gonna come back
|
||||
|
||||
Property durabilityFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Durability factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all TAIGA materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
durabilityFactorGeneralProp.setLanguageKey("gui.taiga_configuration.durability_multiplier");
|
||||
durabilityFactorGeneralProp.setRequiresMcRestart(true);
|
||||
Property speedFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Speed factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all TAIGA materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
speedFactorGeneralProp.setLanguageKey("gui.taiga_configuration.speed_multiplier");
|
||||
speedFactorGeneralProp.setRequiresMcRestart(true);
|
||||
Property attackFactorGeneralProp = config.get(CATEGORY_NAME_GENERAL, "Attack factor", RESFAC_DEFAULT_VALUE,
|
||||
"General multiplier for all TAIGA materials", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
attackFactorGeneralProp.setLanguageKey("gui.taiga_configuration.attack_multiplier");
|
||||
attackFactorGeneralProp.setRequiresMcRestart(true);
|
||||
|
||||
*/
|
||||
|
||||
List<String> propOrderGeneral = new ArrayList<String>();
|
||||
propOrderGeneral.add(ironSwitch.getName());
|
||||
propOrderGeneral.add(slagIronSwitch.getName());
|
||||
propOrderGeneral.add(slagGoldSwitch.getName());
|
||||
propOrderGeneral.add(durabilityFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(speedFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(attackFactorGeneralProp.getName());
|
||||
propOrderGeneral.add(endSwitch.getName());
|
||||
// propOrderGeneral.add(durabilityFactorGeneralProp.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_GENERAL, propOrderGeneral);
|
||||
|
||||
/*
|
||||
* Declaration of specific ore generation values: <br>
|
||||
* Generation chance multiplier
|
||||
*/
|
||||
Property ironFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Iron factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ironFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property titaniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Titanite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
titaniteFactorProp.setLanguageKey("gui.taiga_configuration.titanite_multiplier");
|
||||
Property adamantiteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Adamantite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
adamantiteFactorProp.setLanguageKey("gui.taiga_configuration.adamantite_multiplier");
|
||||
Property arcaniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Arcanite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
arcaniteFactorProp.setLanguageKey("gui.taiga_configuration.arcanite_multiplier");
|
||||
Property violiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Violium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
violiumFactorProp.setLanguageKey("gui.taiga_configuration.violium_multiplier");
|
||||
Property bismuthFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Bismuth factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
bismuthFactorProp.setLanguageKey("gui.taiga_configuration.bismuth_multiplier");
|
||||
Property eterniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Eternite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
eterniteFactorProp.setLanguageKey("gui.taiga_configuration.eternite_multiplier");
|
||||
Property ignititeFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Ignitite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ignititeFactorProp.setLanguageKey("gui.taiga_configuration.ignitite_multiplier");
|
||||
Property karmesineFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Karmesine factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
karmesineFactorProp.setLanguageKey("gui.taiga_configuration.karmesine_multiplier");
|
||||
Property meteoriteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Meteorite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
meteoriteFactorProp.setLanguageKey("gui.taiga_configuration.meteorite_multiplier");
|
||||
Property mindoriteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Mindorite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
mindoriteFactorProp.setLanguageKey("gui.taiga_configuration.mindorite_multiplier");
|
||||
Property mythrilFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Mythril factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
mythrilFactorProp.setLanguageKey("gui.taiga_configuration.mythril_multiplier");
|
||||
Property palladiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Palladium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
palladiumFactorProp.setLanguageKey("gui.taiga_configuration.palladium_multiplier");
|
||||
Property prometheumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Prometheum factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
prometheumFactorProp.setLanguageKey("gui.taiga_configuration.prometheum_multiplier");
|
||||
Property tiberiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Tiberium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
tiberiumFactorProp.setLanguageKey("gui.taiga_configuration.tiberium_multiplier");
|
||||
Property vibraniumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Vibranium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
vibraniumFactorProp.setLanguageKey("gui.taiga_configuration.vibranium_multiplier");
|
||||
Property rubiumFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Rubium factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
rubiumFactorProp.setLanguageKey("gui.taiga_configuration.rubium_multiplier");
|
||||
// RottenGround + Basalt
|
||||
Property basaltFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Basalt factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
basaltFactorProp.setLanguageKey("gui.taiga_configuration.basalt_multiplier");
|
||||
Property rottengroundFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "RottenGround factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
rottengroundFactorProp.setLanguageKey("gui.taiga_configuration.rottenground_multiplier");
|
||||
Property ligniteFactorProp = config.get(CATEGORY_NAME_ORE_GEN, "Lignite factor", RESFAC_DEFAULT_VALUE,
|
||||
"specific generation multiplier", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ligniteFactorProp.setLanguageKey("gui.taiga_configuration.lignite_multiplier");
|
||||
|
||||
Property ironValue = config.get(CATEGORY_NAME_ORE_GEN, "Iron", IRON_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
ironValue.setLanguageKey("gui.taiga_configuration.iron_multiplier");
|
||||
Property basaltValue = config.get(CATEGORY_NAME_ORE_GEN, "Basalt", BASALT_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
basaltValue.setLanguageKey("gui.taiga_configuration.basalt_multiplier");
|
||||
Property tiberiumValue = config.get(CATEGORY_NAME_ORE_GEN, "Tiberium", TIBERIUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
tiberiumValue.setLanguageKey("gui.taiga_configuration.tiberium_multiplier");
|
||||
Property auroriumValue = config.get(CATEGORY_NAME_ORE_GEN, "Aurorium", AURORIUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
auroriumValue.setLanguageKey("gui.taiga_configuration.aurorium_multiplier");
|
||||
Property prometheumValue = config.get(CATEGORY_NAME_ORE_GEN, "Prometheum", PROMETHEUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
prometheumValue.setLanguageKey("gui.taiga_configuration.prometheum_multiplier");
|
||||
Property duraniteValue = config.get(CATEGORY_NAME_ORE_GEN, "Duranite", DURANITE_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
duraniteValue.setLanguageKey("gui.taiga_configuration.duranite_multiplier");
|
||||
Property valyriumValue = config.get(CATEGORY_NAME_ORE_GEN, "Valyrium", VALYRIUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
valyriumValue.setLanguageKey("gui.taiga_configuration.valyrium_multiplier");
|
||||
Property vibraniumValue = config.get(CATEGORY_NAME_ORE_GEN, "Vibranium", VIBRANIUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
vibraniumValue.setLanguageKey("gui.taiga_configuration.vibranium_multiplier");
|
||||
Property karmesineValue = config.get(CATEGORY_NAME_ORE_GEN, "Karmesine", KARMESINE_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
karmesineValue.setLanguageKey("gui.taiga_configuration.karmesine_multiplier");
|
||||
Property palladiumValue = config.get(CATEGORY_NAME_ORE_GEN, "Palladium", PALLADIUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
palladiumValue.setLanguageKey("gui.taiga_configuration.palladium_multiplier");
|
||||
Property uruValue = config.get(CATEGORY_NAME_ORE_GEN, "Uru", URU_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
uruValue.setLanguageKey("gui.taiga_configuration.uru_multiplier");
|
||||
Property osramValue = config.get(CATEGORY_NAME_ORE_GEN, "Osram", OSRAM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
osramValue.setLanguageKey("gui.taiga_configuration.osram_multiplier");
|
||||
Property abyssumValue = config.get(CATEGORY_NAME_ORE_GEN, "Abyssum", ABYSSUM_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
abyssumValue.setLanguageKey("gui.taiga_configuration.abyssum_multiplier");
|
||||
Property eezoValue = config.get(CATEGORY_NAME_ORE_GEN, "Eezo", EEZO_VAL, "value for generation", RESFAC_MIN_VALUE, RESFAC_MAX_VALUE);
|
||||
eezoValue.setLanguageKey("gui.taiga_configuration.eezo_multiplier");
|
||||
|
||||
|
||||
List<String> propOrderOreGen = new ArrayList<String>();
|
||||
propOrderOreGen.add(ironFactorProp.getName());
|
||||
propOrderOreGen.add(ligniteFactorProp.getName());
|
||||
propOrderOreGen.add(basaltFactorProp.getName());
|
||||
propOrderOreGen.add(rottengroundFactorProp.getName());
|
||||
propOrderOreGen.add(titaniteFactorProp.getName());
|
||||
propOrderOreGen.add(adamantiteFactorProp.getName());
|
||||
propOrderOreGen.add(arcaniteFactorProp.getName());
|
||||
propOrderOreGen.add(violiumFactorProp.getName());
|
||||
propOrderOreGen.add(bismuthFactorProp.getName());
|
||||
propOrderOreGen.add(eterniteFactorProp.getName());
|
||||
propOrderOreGen.add(ignititeFactorProp.getName());
|
||||
propOrderOreGen.add(karmesineFactorProp.getName());
|
||||
propOrderOreGen.add(meteoriteFactorProp.getName());
|
||||
propOrderOreGen.add(mindoriteFactorProp.getName());
|
||||
propOrderOreGen.add(mythrilFactorProp.getName());
|
||||
propOrderOreGen.add(palladiumFactorProp.getName());
|
||||
propOrderOreGen.add(prometheumFactorProp.getName());
|
||||
propOrderOreGen.add(tiberiumFactorProp.getName());
|
||||
propOrderOreGen.add(vibraniumFactorProp.getName());
|
||||
propOrderOreGen.add(rubiumFactorProp.getName());
|
||||
propOrderOreGen.add(ironValue.getName());
|
||||
propOrderOreGen.add(basaltValue.getName());
|
||||
propOrderOreGen.add(tiberiumValue.getName());
|
||||
propOrderOreGen.add(auroriumValue.getName());
|
||||
propOrderOreGen.add(prometheumValue.getName());
|
||||
propOrderOreGen.add(duraniteValue.getName());
|
||||
propOrderOreGen.add(valyriumValue.getName());
|
||||
propOrderOreGen.add(vibraniumValue.getName());
|
||||
propOrderOreGen.add(karmesineValue.getName());
|
||||
propOrderOreGen.add(palladiumValue.getName());
|
||||
propOrderOreGen.add(uruValue.getName());
|
||||
propOrderOreGen.add(osramValue.getName());
|
||||
propOrderOreGen.add(abyssumValue.getName());
|
||||
propOrderOreGen.add(eezoValue.getName());
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_ORE_GEN, propOrderOreGen);
|
||||
|
||||
|
||||
List<String> propOrderOreVal = new ArrayList<String>();
|
||||
config.setCategoryPropertyOrder(CATEGORY_NAME_ORE_VAL, propOrderOreVal);
|
||||
|
||||
|
||||
if (readFieldsFromConfig) {
|
||||
durabilityFactorGeneral = durabilityFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (durabilityFactorGeneral > RESFAC_MAX_VALUE || durabilityFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
durabilityFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
speedFactorGeneral = speedFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (speedFactorGeneral > RESFAC_MAX_VALUE || speedFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
speedFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
attackFactorGeneral = attackFactorGeneralProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (attackFactorGeneral > RESFAC_MAX_VALUE || attackFactorGeneral < RESFAC_MIN_VALUE) {
|
||||
attackFactorGeneral = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ironGen = ironSwitch.getBoolean(GENERATION_DEFAULT_VALUE);
|
||||
ironFactor = ironFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ironFactor > RESFAC_MAX_VALUE || ironFactor < RESFAC_MIN_VALUE) {
|
||||
ironFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
titaniteFactor = titaniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (titaniteFactor > RESFAC_MAX_VALUE || titaniteFactor < RESFAC_MIN_VALUE) {
|
||||
titaniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
adamantiteFactor = adamantiteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (adamantiteFactor > RESFAC_MAX_VALUE || adamantiteFactor < RESFAC_MIN_VALUE) {
|
||||
adamantiteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
arcaniteFactor = arcaniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (arcaniteFactor > RESFAC_MAX_VALUE || arcaniteFactor < RESFAC_MIN_VALUE) {
|
||||
arcaniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
violiumFactor = violiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (violiumFactor > RESFAC_MAX_VALUE || violiumFactor < RESFAC_MIN_VALUE) {
|
||||
violiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
bismuthFactor = bismuthFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (bismuthFactor > RESFAC_MAX_VALUE || bismuthFactor < RESFAC_MIN_VALUE) {
|
||||
bismuthFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
eterniteFactor = eterniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (eterniteFactor > RESFAC_MAX_VALUE || eterniteFactor < RESFAC_MIN_VALUE) {
|
||||
eterniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ignititeFactor = ignititeFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ignititeFactor > RESFAC_MAX_VALUE || ignititeFactor < RESFAC_MIN_VALUE) {
|
||||
ignititeFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
karmesineFactor = karmesineFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (karmesineFactor > RESFAC_MAX_VALUE || karmesineFactor < RESFAC_MIN_VALUE) {
|
||||
karmesineFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
meteoriteFactor = meteoriteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (meteoriteFactor > RESFAC_MAX_VALUE || meteoriteFactor < RESFAC_MIN_VALUE) {
|
||||
meteoriteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
mindoriteFactor = mindoriteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (mindoriteFactor > RESFAC_MAX_VALUE || mindoriteFactor < RESFAC_MIN_VALUE) {
|
||||
mindoriteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
mythrilFactor = mythrilFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (mythrilFactor > RESFAC_MAX_VALUE || mythrilFactor < RESFAC_MIN_VALUE) {
|
||||
mythrilFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
palladiumFactor = palladiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (palladiumFactor > RESFAC_MAX_VALUE || palladiumFactor < RESFAC_MIN_VALUE) {
|
||||
palladiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
prometheumFactor = prometheumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (prometheumFactor > RESFAC_MAX_VALUE || prometheumFactor < RESFAC_MIN_VALUE) {
|
||||
prometheumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
tiberiumFactor = tiberiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (tiberiumFactor > RESFAC_MAX_VALUE || tiberiumFactor < RESFAC_MIN_VALUE) {
|
||||
tiberiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
vibraniumFactor = vibraniumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (vibraniumFactor > RESFAC_MAX_VALUE || vibraniumFactor < RESFAC_MIN_VALUE) {
|
||||
vibraniumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
rubiumFactor = rubiumFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (rubiumFactor > RESFAC_MAX_VALUE || rubiumFactor < RESFAC_MIN_VALUE) {
|
||||
rubiumFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
basaltFactor = basaltFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (basaltFactor > RESFAC_MAX_VALUE || basaltFactor < RESFAC_MIN_VALUE) {
|
||||
basaltFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
rottengroundFactor = rottengroundFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (rottengroundFactor > RESFAC_MAX_VALUE || rottengroundFactor < RESFAC_MIN_VALUE) {
|
||||
rottengroundFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
ligniteFactor = ligniteFactorProp.getDouble(RESFAC_DEFAULT_VALUE);
|
||||
if (ligniteFactor > RESFAC_MAX_VALUE || ligniteFactor < RESFAC_MIN_VALUE) {
|
||||
ligniteFactor = RESFAC_DEFAULT_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
ironSwitch.set(ironGen);
|
||||
durabilityFactorGeneralProp.set(durabilityFactorGeneral);
|
||||
speedFactorGeneralProp.set(speedFactorGeneral);
|
||||
attackFactorGeneralProp.set(attackFactorGeneral);
|
||||
titaniteFactorProp.set(titaniteFactor);
|
||||
adamantiteFactorProp.set(adamantiteFactor);
|
||||
arcaniteFactorProp.set(arcaniteFactor);
|
||||
violiumFactorProp.set(violiumFactor);
|
||||
bismuthFactorProp.set(bismuthFactor);
|
||||
eterniteFactorProp.set(eterniteFactor);
|
||||
ignititeFactorProp.set(ignititeFactor);
|
||||
karmesineFactorProp.set(karmesineFactor);
|
||||
meteoriteFactorProp.set(meteoriteFactor);
|
||||
mindoriteFactorProp.set(mindoriteFactor);
|
||||
mythrilFactorProp.set(mythrilFactor);
|
||||
palladiumFactorProp.set(palladiumFactor);
|
||||
prometheumFactorProp.set(prometheumFactor);
|
||||
tiberiumFactorProp.set(tiberiumFactor);
|
||||
vibraniumFactorProp.set(vibraniumFactor);
|
||||
rubiumFactorProp.set(rubiumFactor);
|
||||
basaltFactorProp.set(basaltFactor);
|
||||
rottengroundFactorProp.set(rottengroundFactor);
|
||||
ligniteFactorProp.set(ligniteFactor);
|
||||
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
@@ -343,7 +162,7 @@ public class TAIGAConfiguration {
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL)
|
||||
public void onEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
|
||||
if (TAIGA.MODID.equals(event.getModID()) && !event.isWorldRunning()) {
|
||||
if (event.getConfigID().equals(CATEGORY_NAME_GENERAL) || event.getConfigID().equals(CATEGORY_NAME_ORE_GEN) || event.getConfigID().equals(CATEGORY_NAME_ORE_VAL)) {
|
||||
if (event.getConfigID().equals(CATEGORY_NAME_GENERAL) || event.getConfigID().equals(CATEGORY_NAME_ORE_GEN)) {
|
||||
syncFromGUI();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user