use of net.minecraftforge.common.config.Configuration in project BetterWithAddons by DaedalusGame.
the class ModConfiguration method preInit.
public void preInit(FMLPreInitializationEvent event) {
configuration = new Configuration(event.getSuggestedConfigurationFile());
configuration.load();
configuration.getCategory("interaction").setComment("Enable or disable mod interactions.");
InteractionBWM.ENABLED = BWM_Enabled.init(configuration);
InteractionBWM.MILL_CLAY = BWM_MillClay.init(configuration);
InteractionBWM.CHORUS_IN_CAULDRON = BWM_ChorusInCauldron.init(configuration);
InteractionBWM.BUTCHER_BLOCKS = BWM_ButcherBlocks.init(configuration);
InteractionBWM.CAULDRONS_EXPLODE = BWM_CauldronsExplode.init(configuration);
InteractionBWM.HARDCORE_SHEARING = BWM_HardcoreShearing.init(configuration);
InteractionBWM.WOOL_MULTIPLIER = BWM_WoolMultiplier.init(configuration);
InteractionBWM.DYE_IN_CAULDRON = BWM_DyeInCauldron.init(configuration);
InteractionBWM.HARDCORE_PACKING = BWM_HardcorePacking.init(configuration);
InteractionBWM.SHEARS_WHITELIST = BWM_ShearWhitelist.init(configuration);
InteractionQuark.ENABLED = Quark_Enabled.init(configuration);
InteractionQuark.MIDORI_BLOCKS_NEED_CHUNKS = Quark_MidoriBlocksNeedChunks.init(configuration);
configuration.getCategory("addons").setComment("Configure individual addons.");
InteractionBWA.STONEBRICKS_NEED_SMELTING = BWA_StoneBricksNeedSmelting.init(configuration);
InteractionBWA.RADIUS = BWA_LureTreeRadius.init(configuration);
InteractionBWA.MAXCHARGE = BWA_LureTreeTime.init(configuration);
InteractionBWA.MAXFOOD = BWA_LureTreeMaxFood.init(configuration);
InteractionBWA.OBVIOUS_STORMS = BWA_ObviousStorms.init(configuration);
InteractionBWA.OBVIOUS_SAND_STORMS = BWA_ObviousSandStorms.init(configuration);
InteractionBWA.DUST_PARTICLES = BWA_ObviousDustParticles.init(configuration);
InteractionBWA.AIR_PARTICLES = BWA_ObviousAirParticles.init(configuration);
InteractionBWA.GATED_AQUEDUCTS = BWA_GatedAqueducts.init(configuration);
InteractionBWA.AQUEDUCT_MAX_LENGTH = BWA_MaxAqueductLength.init(configuration);
InteractionBWA.AQUEDUCT_BIOME_STRINGS = BWA_AqueductBiomes.init(configuration);
InteractionBWA.AQUEDUCT_BIOMES_IS_WHITELIST = BWA_AqueductBiomeWhitelist.init(configuration);
InteractionBWA.ARMOR_SHARD_RENDER = BWA_ArmorShardRender.init(configuration);
InteractionBWA.LEGENDARIUM_MIN_DAMAGE = BWA_LegendariumMinDamage.init(configuration);
InteractionBWA.LEGENDARIUM_DAMAGE_PAD = BWA_LegendariumDamagePad.init(configuration);
InteractionBWA.LEGENDARIUM_POSTER_RANGE = BWA_LegendariumPosterRange.init(configuration);
InteractionBWA.LEGENDARIUM_MIN_QUEUE_SIZE = BWA_LegendariumMinQueueSize.init(configuration);
InteractionBWA.LEGENDARIUM_TURN_IN_DELAY = BWA_LegendariumTurnInDelay.init(configuration);
InteractionBWA.CONVENIENT_TOOLS_PRE_END = BWA_ConvenientIronTools.init(configuration);
InteractionBWA.ROTTEN_FOOD = BWA_RottenFood.init(configuration);
InteractionBWA.ROTTEN_FOOD_BLACKLIST = BWA_RottenFoodBlacklist.init(configuration);
InteractionBWA.ROTTEN_FOOD_COMBINING = BWA_RottenFoodCombining.init(configuration);
InteractionBWA.MEAT_ROT_TIME = BWA_RottenMeatTime.init(configuration);
InteractionBWA.FISH_ROT_TIME = BWA_RottenFishTime.init(configuration);
InteractionBWA.FRUIT_ROT_TIME = BWA_RottenFruitTime.init(configuration);
InteractionBWA.MISC_ROT_TIME = BWA_RottenMiscTime.init(configuration);
InteractionEriottoMod.ENABLED = EriottoMod_Enabled.init(configuration);
// InteractionEriottoMod.GRASS_DROPS_SEEDS = EriottoMod_GrassDropsSeeds.init(configuration);
InteractionEriottoMod.ALTERNATE_INFUSER_RECIPE = EriottoMod_AlternateInfuserRecipe.init(configuration);
InteractionEriottoMod.INFUSER_REPAIRS = EriottoMod_InfuserRepairs.init(configuration);
InteractionEriottoMod.JAPANESE_RANDOM_SPAWN = EriottoMod_RandomJapaneseMobs.init(configuration);
InteractionEriottoMod.JAPANESE_RANDOM_SPAWN_WEIGHT = EriottoMod_RandomJapaneseWeight.init(configuration);
InteractionEriottoMod.MAX_SPIRITS = EriottoMod_MaxSpirits.init(configuration);
InteractionEriottoMod.SPIRIT_PER_BOTTLE = EriottoMod_SpiritsPerBottle.init(configuration);
InteractionDecoAddon.ENABLED = DecoAddon_Enabled.init(configuration);
InteractionDecoAddon.WOOD_COLORING = DecoAddon_WoodColoring.init(configuration);
InteractionDecoAddon.ALTERNATE_WROUGHT_BARS = DecoAddon_AlternateWroughtBars.init(configuration);
InteractionDecoAddon.CHISEL_BRICKS_IN_ANVIL = DecoAddon_ChiselBricksInAnvil.init(configuration);
InteractionDecoAddon.GLASS_PANE_REBALANCE = DecoAddon_GlassPaneRebalance.init(configuration);
InteractionDecoAddon.GLASS_FURNACE = DecoAddon_GlassFurnace.init(configuration);
InteractionDecoAddon.CHEAPER_BOTTLES = DecoAddon_CheaperBottles.init(configuration);
InteractionDecoAddon.RECYCLE_BOTTLES = DecoAddon_RecycleBottles.init(configuration);
InteractionCondensedOutputs.ENABLED = CondensedOutputs_Enabled.init(configuration);
InteractionCondensedOutputs.LOSE_BINDER = CondensedOutputs_LoseBinder.init(configuration);
InteractionCondensedOutputs.SPINUP_TIME = CondensedOutputs_SpindleTime.init(configuration);
InteractionCondensedOutputs.SPINDLE_COMPRESSES_BOLTS = CondensedOutputs_Spinning.init(configuration);
InteractionCondensedOutputs.HOPPER_COMPRESSES_CRATES = CondensedOutputs_Crating.init(configuration);
InteractionCondensedOutputs.CAULDRON_COMPRESSES_SLIME = CondensedOutputs_Congealing.init(configuration);
InteractionBTWTweak.ENABLED = BTWTweak_Enabled.init(configuration);
InteractionBTWTweak.SAW_RECYCLING = BTWTweak_SawRecycling.init(configuration);
InteractionBTWTweak.EGG_INCUBATION = BTWTweak_EggIncubation.init(configuration);
InteractionBTWTweak.SLIPPERY_WHEN_WET = BTWTweak_SlipperyWhenWet.init(configuration);
InteractionBTWTweak.ASH_FERTILIZER = BTWTweak_AshFertilizer.init(configuration);
InteractionBTWTweak.LOGS_SMELT_TO_ASH = BTWTweak_LogsSmeltToAsh.init(configuration);
InteractionBTWTweak.REPLACE_WRITABLE_BOOK_RECIPE = BTWTweak_ReplaceWritableBookRecipe.init(configuration);
InteractionBTWTweak.WOOL_RECYCLING = BTWTweak_WoolRecycling.init(configuration);
InteractionWheat.ENABLED = Wheat_Enabled.init(configuration);
InteractionWheat.TEXTURE_CHANGES = Wheat_ChangeTextures.init(configuration);
InteractionWheat.MILL_GRAIN = Wheat_MillGrain.init(configuration);
InteractionWheat.THRESH_WHEAT = Wheat_ThreshWheat.init(configuration);
InteractionWheat.THRESH_WHEAT_MILL = Wheat_ThreshWheatMill.init(configuration);
InteractionWheat.CHANGE_HAY_BALES = Wheat_ChangeHayBales.init(configuration);
InteractionWheat.REPLACE_WHEAT_DROPS = Wheat_ReplaceWheatDrops.init(configuration);
InteractionWheat.DIG_UP_CROPS = Wheat_DigUpCrops.init(configuration);
InteractionBWR.ENABLED = BWR_Enabled.init(configuration);
InteractionBWR.REDSTONE_SYNTHESIS = BWR_RedstoneSynthesis.init(configuration);
InteractionBWR.REDSTONE_SYNTHESIS_EARLY = BWR_RedstoneSynthesisEarly.init(configuration);
InteractionBWR.REDSTONE_PER_SYNTHESIS = BWR_RedstonePerSynthesis.init(configuration);
InteractionBWR.HELLFIRE_EARLY = BWR_HellfireEarly.init(configuration);
InteractionBWR.BOILING_BUSHES = BWR_BoilingBushes.init(configuration);
InteractionBWR.WEAVING_WEBS = BWR_WeavingWebs.init(configuration);
InteractionBWR.LAPIS_FROM_WOOL = BWR_LapisFromWool.init(configuration);
InteractionBWR.DIAMOND_SYNTHESIS = BWR_DiamondSynthesis.init(configuration);
InteractionBWR.DIAMOND_RECOVERY = BWR_DiamondRecovery.init(configuration);
InteractionBWR.GOLD_GRINDING = BWR_GoldGrinding.init(configuration);
InteractionBWR.GOLD_PER_INGOT = BWR_GoldPerIngot.init(configuration);
InteractionBWR.NETHERRACK_SYNTHESIS = BWR_NetherrackSynthesis.init(configuration);
InteractionBWR.SOULSAND_INFUSION = BWR_SoulsandInfusion.init(configuration);
InteractionBWR.BLAZE_GOLEMS = BWR_BlazeGolems.init(configuration);
InteractionBWR.BLAZE_BREEDING = BWR_BlazeBreeding.init(configuration);
InteractionBWR.DUNG_TO_DIRT = BWR_DungToDirt.init(configuration);
InteractionBWR.SAND_TO_CLAY = BWR_SandToClay.init(configuration);
InteractionBWR.QUARTZ_GROWING = BWR_QuartzSynthesis.init(configuration);
InteractionBWR.CROSSBREED_PLANTS = BWR_PlantBreeding.init(configuration);
InteractionBWR.CROSSBREED_ANIMALS = BWR_AnimalBreeding.init(configuration);
InteractionBWR.MELT_HELLFIRE = BWR_MeltHellfire.init(configuration);
InteractionBWR.REDSTONE_BOILING = BWR_RedstoneBoiling.init(configuration);
if (configuration.hasChanged()) {
configuration.save();
}
}
use of net.minecraftforge.common.config.Configuration in project malmo by Microsoft.
the class MalmoMod method preInit.
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
if (!SchemaHelper.testSchemaVersionNumbers(Loader.instance().activeModContainer().getVersion()))
throw new RuntimeException("This mod has been incorrectly built; check schema version numbers.");
if (event.getModMetadata().version.equals("${version}")) {
// The mcmod.info version number is populated by gradle; if we've been built without gradle,
// via eclipse say, then we can just use the internal version number instead, which comes to us from the version.properties file.
// (There's no real benefit to doing this; it just looks nicer in the Mod GUI if the version number is filled in.)
event.getModMetadata().version = Loader.instance().activeModContainer().getVersion();
}
// Load the correct configs (client or server)
File configDir = event.getModConfigurationDirectory();
File sessionConfigFile = new File(configDir, MODID + event.getSide().toString() + ".cfg");
File permanentConfigFile = new File(configDir, MODID + event.getSide().toString() + "Permanent.cfg");
this.sessionConfig = new Configuration(sessionConfigFile);
this.sessionConfig.load();
this.permanentConfig = new Configuration(permanentConfigFile);
this.permanentConfig.load();
AddressHelper.update(this.sessionConfig);
ScreenHelper.update(this.permanentConfig);
TCPUtils.update(this.permanentConfig);
network = NetworkRegistry.INSTANCE.newSimpleChannel("Malmo");
network.registerMessage(ObservationFromFullStatsImplementation.FullStatsRequestMessageHandler.class, ObservationFromFullStatsImplementation.FullStatsRequestMessage.class, 1, Side.SERVER);
network.registerMessage(ObservationFromGridImplementation.GridRequestMessageHandler.class, ObservationFromGridImplementation.GridRequestMessage.class, 2, Side.SERVER);
// Malmo messages from server to client
network.registerMessage(MalmoMessageHandler.class, MalmoMessage.class, 3, Side.CLIENT);
network.registerMessage(SimpleCraftCommandsImplementation.CraftMessageHandler.class, SimpleCraftCommandsImplementation.CraftMessage.class, 4, Side.SERVER);
network.registerMessage(AbsoluteMovementCommandsImplementation.TeleportMessageHandler.class, AbsoluteMovementCommandsImplementation.TeleportMessage.class, 5, Side.SERVER);
// Malmo messages from client to server
network.registerMessage(MalmoMessageHandler.class, MalmoMessage.class, 6, Side.SERVER);
network.registerMessage(InventoryCommandsImplementation.InventoryMessageHandler.class, InventoryCommandsImplementation.InventoryMessage.class, 7, Side.SERVER);
network.registerMessage(DiscreteMovementCommandsImplementation.UseActionMessageHandler.class, DiscreteMovementCommandsImplementation.UseActionMessage.class, 8, Side.SERVER);
network.registerMessage(DiscreteMovementCommandsImplementation.AttackActionMessageHandler.class, DiscreteMovementCommandsImplementation.AttackActionMessage.class, 9, Side.SERVER);
network.registerMessage(ObservationFromFullInventoryImplementation.InventoryRequestMessageHandler.class, ObservationFromFullInventoryImplementation.InventoryRequestMessage.class, 10, Side.SERVER);
network.registerMessage(InventoryCommandsImplementation.InventoryChangeMessageHandler.class, InventoryCommandsImplementation.InventoryChangeMessage.class, 11, Side.CLIENT);
network.registerMessage(ObservationFromSystemImplementation.SystemRequestMessageHandler.class, ObservationFromSystemImplementation.SystemRequestMessage.class, 12, Side.SERVER);
}
use of net.minecraftforge.common.config.Configuration in project Gaspunk by Ladysnake.
the class CommonProxy method preInit.
public void preInit(FMLPreInitializationEvent event) {
CapabilityBreathing.register();
CapabilitySickness.register();
config = new Configuration(event.getSuggestedConfigurationFile());
}
use of net.minecraftforge.common.config.Configuration in project MorePlanets by SteveKunG.
the class ConfigManagerMP method init.
public static void init(File file) {
ConfigManagerMP.config = new Configuration(file);
ConfigManagerMP.syncConfig(true);
}
Aggregations