use of net.minecraftforge.common.config.Property in project SecurityCraft by Geforce132.
the class ConfigurationHandler method setupConfiguration.
public void setupConfiguration() {
mod_SecurityCraft.configFile.load();
Property dummyProp;
dummyProp = mod_SecurityCraft.configFile.get("options", "Is codebreaker allowed?", true);
dummyProp.setLanguageKey("config.isCodebreakerAllowed");
allowCodebreakerItem = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Is admin tool allowed?", false);
dummyProp.setLanguageKey("config.allowAdminTool");
allowAdminTool = dummyProp.getBoolean(false);
dummyProp = mod_SecurityCraft.configFile.get("options", "Mine(s) spawn fire when detonated?", true);
dummyProp.setLanguageKey("config.shouldSpawnFire");
shouldSpawnFire = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Are mines unbreakable?", true);
dummyProp.setLanguageKey("config.ableToBreakMines");
ableToBreakMines = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable level 1 keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftKeycard1");
ableToCraftKeycard1 = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable level 2 keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftKeycard2");
ableToCraftKeycard2 = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable level 3 keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftKeycard3");
ableToCraftKeycard3 = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable level 4 keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftKeycard4");
ableToCraftKeycard4 = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable level 5 keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftKeycard5");
ableToCraftKeycard5 = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Craftable Limited Use keycard?", true);
dummyProp.setLanguageKey("config.ableToCraftLUKeycard");
ableToCraftLUKeycard = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Mines use a smaller explosion?", false);
dummyProp.setLanguageKey("config.smallerMineExplosion");
smallerMineExplosion = dummyProp.getBoolean(false);
dummyProp = mod_SecurityCraft.configFile.get("options", "Mines explode when broken in Creative?", true);
dummyProp.setLanguageKey("config.mineExplodesWhenInCreative");
mineExplodesWhenInCreative = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Portable radar search radius:", 25);
dummyProp.setLanguageKey("config.portableRadarSearchRadius");
portableRadarSearchRadius = dummyProp.getDouble(25);
dummyProp = mod_SecurityCraft.configFile.get("options", "Username logger search radius:", 3);
dummyProp.setLanguageKey("config.usernameLoggerSearchRadius");
usernameLoggerSearchRadius = dummyProp.getInt(3);
dummyProp = mod_SecurityCraft.configFile.get("options", "Laser range:", 5);
dummyProp.setLanguageKey("config.laserBlockRange");
laserBlockRange = dummyProp.getInt(5);
dummyProp = mod_SecurityCraft.configFile.get("options", "Delay between alarm sounds (seconds):", 2);
dummyProp.setLanguageKey("config.alarmTickDelay");
alarmTickDelay = dummyProp.getInt(2);
dummyProp = mod_SecurityCraft.configFile.get("options", "Alarm sound volume:", 0.8D);
dummyProp.setLanguageKey("config.alarmSoundVolume");
alarmSoundVolume = dummyProp.getDouble(0.8D);
dummyProp = mod_SecurityCraft.configFile.get("options", "Portable radar delay (seconds):", 4);
dummyProp.setLanguageKey("config.portableRadarDelay");
portableRadarDelay = dummyProp.getInt(4);
dummyProp = mod_SecurityCraft.configFile.get("options", "Claymore range:", 5);
dummyProp.setLanguageKey("config.claymoreRange");
claymoreRange = dummyProp.getInt(5);
dummyProp = mod_SecurityCraft.configFile.get("options", "IMS range:", 12);
dummyProp.setLanguageKey("config.imsRange");
imsRange = dummyProp.getInt(12);
dummyProp = mod_SecurityCraft.configFile.get("options", "Display a 'tip' message at spawn?", true);
dummyProp.setLanguageKey("config.sayThanksMessage");
sayThanksMessage = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Is debug mode? (not recommended!)", false);
dummyProp.setLanguageKey("config.debuggingMode");
mod_SecurityCraft.debuggingMode = dummyProp.getBoolean(false);
dummyProp = mod_SecurityCraft.configFile.get("options", "Is IRC bot enabled?", true);
dummyProp.setLanguageKey("config.isIrcBotEnabled");
isIrcBotEnabled = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Disconnect IRC bot on world exited?", true);
dummyProp.setLanguageKey("config.disconnectOnWorldClose");
disconnectOnWorldClose = dummyProp.getBoolean(true);
dummyProp = mod_SecurityCraft.configFile.get("options", "Use old keypad recipe (9 buttons)?", false);
dummyProp.setLanguageKey("config.useOldKeypadRecipe");
useOldKeypadRecipe = dummyProp.getBoolean(false);
dummyProp = mod_SecurityCraft.configFile.get("options", "Camera Speed when not using LookingGlass:", 2);
dummyProp.setLanguageKey("config.cameraSpeed");
cameraSpeed = dummyProp.getInt(2);
dummyProp = mod_SecurityCraft.configFile.get("options", "Should check for updates on Github?", true);
dummyProp.setLanguageKey("config.checkForUpdates");
checkForUpdates = dummyProp.getBoolean(true);
if (mod_SecurityCraft.configFile.hasChanged()) {
mod_SecurityCraft.configFile.save();
}
}
use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.
the class AMConfig method getConfigurablePotionID.
public int getConfigurablePotionID(String id, int default_value) {
// because we auto-configure, default_value is ignored
int val = getNextFreePotionID();
if (val == -1 && !hasKey(CATEGORY_POTIONS, id)) {
LogHelper.error("Cannot find a free potion ID for the %s effect. This will cause severe problems!", id);
LogHelper.error("Effect %s has been assigned to a default of potion ID 1 (movement speed). Erroneous behaviour *will* result.", id);
val = 1;
}
Property prop = get(CATEGORY_POTIONS, id, val);
val = prop.getInt(val);
save();
return val;
}
use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.
the class AMConfig method setAuraBehaviour.
public void setAuraBehaviour(int index) {
if (index < 0)
index = 0;
if (index >= ParticleController.AuraControllerOptions.length)
index = ParticleController.AuraControllerOptions.length - 1;
Property prop = get(CATEGORY_BETA, KEY_AuraBehaviour, 0);
prop.set(index);
this.AuraBehaviour = index;
}
use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.
the class AMConfig method setAuraIndex.
//====================================================================================
// Setters
//====================================================================================
public void setAuraIndex(int index) {
if (index < 0)
index = 0;
if (index >= AMParticle.particleTypes.length)
index = AMParticle.particleTypes.length - 1;
Property prop = get(CATEGORY_BETA, KEY_AuraType, 15);
prop.set(index);
this.AuraType = index;
}
use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.
the class AMConfig method setAuraQuantity.
public void setAuraQuantity(int quantity) {
if (quantity < 1)
quantity = 1;
else if (quantity > 5)
quantity = 5;
Property prop = get(CATEGORY_BETA, KEY_AuraAlpha, 2);
prop.set(quantity);
this.AuraQuantity = quantity;
}
Aggregations