Search in sources :

Example 31 with Property

use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.

the class AMConfig method setAuraColor.

public void setAuraColor(int color) {
    Property prop = get(CATEGORY_BETA, KEY_AuraColor, 0xFFFFFF);
    prop.set(color);
    this.AuraColor = color;
}
Also used : Property(net.minecraftforge.common.config.Property)

Example 32 with Property

use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.

the class AMConfig method setDisplayManaInInventory.

public void setDisplayManaInInventory(boolean value) {
    boolean def = !Loader.isModLoaded("NotEnoughItems");
    Property prop = get(CATEGORY_GENERAL, KEY_DisplayManaInInventory, def, "This will toggle mana display on and off in your inventory.  Default 'O' key in game.");
    prop.set(value);
    this.DisplayManaInInventory = value;
}
Also used : Property(net.minecraftforge.common.config.Property)

Example 33 with Property

use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.

the class AMConfig method setAuraDelay.

public void setAuraDelay(int delay) {
    if (delay < 1)
        delay = 1;
    else if (delay > 200)
        delay = 200;
    Property prop = get(CATEGORY_BETA, KEY_AuraDelay, 5);
    prop.set(delay);
    this.AuraDelay = delay;
}
Also used : Property(net.minecraftforge.common.config.Property)

Example 34 with Property

use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.

the class AMConfig method saveGuiPositions.

public void saveGuiPositions() {
    updateAMVector2(KEY_ManaHudPositionX, KEY_ManaHudPositionY, manaHudPosition);
    updateAMVector2(KEY_BurnoutHudPositionX, KEY_BurnoutHudPositionY, burnoutHudPosition);
    updateAMVector2(KEY_LevelPositionX, KEY_LevelPositionY, levelPosition);
    updateAMVector2(KEY_AffinityPositionX, KEY_AffinityPositionY, affinityPosition);
    updateAMVector2(KEY_BuffsPositivePositionX, KEY_BuffsPositivePositionY, positiveBuffsPosition);
    updateAMVector2(KEY_BuffsNegativePositionX, KEY_BuffsNegativePositionY, negativeBuffsPosition);
    updateAMVector2(KEY_ArmorPositionHeadX, KEY_ArmorPositionHeadY, armorPositionHead);
    updateAMVector2(KEY_ArmorPositionChestX, KEY_ArmorPositionChestY, armorPositionChest);
    updateAMVector2(KEY_ArmorPositionLegsX, KEY_ArmorPositionLegsY, armorPositionLegs);
    updateAMVector2(KEY_ArmorPositionBootsX, KEY_ArmorPositionBootsY, armorPositionBoots);
    updateAMVector2(KEY_XPBarPositionX, KEY_XPBarPositionY, xpBarPosition);
    updateAMVector2(KEY_ContingencyPositionX, KEY_ContingencyPositionY, contingencyPosition);
    updateAMVector2(KEY_ManaNumericPositionX, KEY_ManaNumericPositionY, manaNumericPosition);
    updateAMVector2(KEY_BurnoutNumericPositionX, KEY_BurnoutNumericPositionY, burnoutNumericPosition);
    updateAMVector2(KEY_XPNumericPositionX, KEY_XPNumericPositionY, XPNumericPosition);
    updateAMVector2(KEY_SpellBookPositionX, KEY_SpellBookPositionY, SpellBookPosition);
    Property buffProp;
    buffProp = get(CATEGORY_UI, KEY_ShowBuffs, true);
    buffProp.set(showBuffs);
    Property numProp;
    numProp = get(CATEGORY_UI, KEY_ShowNumerics, false);
    numProp.set(showNumerics);
    Property armorProp;
    armorProp = get(CATEGORY_UI, KEY_ShowArmorUI, true);
    armorProp.set(showArmorUI);
    Property minimalProp;
    minimalProp = get(CATEGORY_UI, KEY_ShowHudMinimally, false);
    minimalProp.set(showHudMinimally);
    Property xpShow;
    xpShow = get(CATEGORY_UI, KEY_ShowXPAlways, false);
    xpShow.set(showXPAlways);
    Property barShow;
    barShow = get(CATEGORY_UI, KEY_ShowHUDBars, true);
    barShow.set(showHudBars);
    save();
}
Also used : Property(net.minecraftforge.common.config.Property)

Example 35 with Property

use of net.minecraftforge.common.config.Property in project ArsMagica2 by Mithion.

the class AMConfig method setAuraSpeed.

public void setAuraSpeed(float speed) {
    if (speed < 0.01f)
        speed = 0.01f;
    else if (speed > 10f)
        speed = 10f;
    Property prop = get(CATEGORY_BETA, KEY_AuraSpeed, 0.02f);
    prop.set(speed);
    this.AuraSpeed = speed;
}
Also used : Property(net.minecraftforge.common.config.Property)

Aggregations

Property (net.minecraftforge.common.config.Property)50 ArrayList (java.util.ArrayList)8 File (java.io.File)2 Configuration (net.minecraftforge.common.config.Configuration)2 AMVector2 (am2.api.math.AMVector2)1 IOException (java.io.IOException)1 Date (java.util.Date)1 IRailcraftModule (mods.railcraft.api.core.IRailcraftModule)1 IVariantEnum (mods.railcraft.api.core.IVariantEnum)1 RailcraftModule (mods.railcraft.api.core.RailcraftModule)1 RailcraftBlocks (mods.railcraft.common.blocks.RailcraftBlocks)1 TrackKits (mods.railcraft.common.blocks.tracks.outfitted.TrackKits)1 RailcraftItems (mods.railcraft.common.items.RailcraftItems)1 ItemMap (mods.railcraft.common.util.collections.ItemMap)1 ConfigCategory (net.minecraftforge.common.config.ConfigCategory)1 ModContainer (net.minecraftforge.fml.common.ModContainer)1