use of net.minecraftforge.common.config.Configuration in project RFToolsDimensions by McJty.
the class CommonProxy method preInit.
public void preInit(FMLPreInitializationEvent e) {
MinecraftForge.EVENT_BUS.register(new ForgeEventHandlers());
GeneralConfig.preInit(e);
modConfigDir = e.getModConfigurationDirectory();
mainConfig = new Configuration(new File(modConfigDir.getPath() + File.separator + "rftools", "dimensions.cfg"));
readMainConfig();
SimpleNetworkWrapper network = PacketHandler.registerMessages(RFToolsDim.MODID, "rftoolsdim");
RFToolsDimMessages.registerNetworkMessages(network);
ModItems.init();
ModBlocks.init();
ModDimensions.init();
DimletRules.readRules(modConfigDir);
}
use of net.minecraftforge.common.config.Configuration in project SecurityCraft by Geforce132.
the class SecurityCraft method preInit.
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
log("Starting to load....");
log("Loading config file....");
log(SecurityCraft.VERSION + " of SecurityCraft is for a post MC-1.6.4 version! Configuration files are useless for setting anything besides options.");
SecurityCraft.configFile = new Configuration(event.getSuggestedConfigurationFile());
SecurityCraft.config.setupConfiguration();
log("Config file loaded.");
log("Setting up handlers!");
MinecraftForge.EVENT_BUS.register(eventHandler);
log("Handlers registered.");
log("Setting up network....");
SecurityCraft.network = NetworkRegistry.INSTANCE.newSimpleChannel(SecurityCraft.MODID);
RegistrationHandler.registerPackets(SecurityCraft.network);
log("Network setup.");
log("Loading mod content....");
SetupHandler.setupBlocks();
SetupHandler.setupMines();
SetupHandler.setupItems();
log("Finished loading mod content.");
log("Regisering mod content... (PT 1/2)");
RegistrationHandler.registerContent();
RegistrationHandler.registerTileEntities();
RegistrationHandler.registerRecipes();
serverProxy.registerTextureFiles();
ModMetadata modMeta = event.getModMetadata();
modMeta.authorList = Arrays.asList(new String[] { "Geforce, bl4ckscor3" });
modMeta.autogenerated = false;
modMeta.credits = "Thanks to all of you guys for your support!";
modMeta.description = "Adds a load of things to keep your house safe with.\nIf you like this mod, hit the green arrow\nin the corner of the forum thread!\nPlease visit the URL above for help. \n \nMessage of the update: \n" + MOTU;
modMeta.url = "http://geforcemods.net";
modMeta.logoFile = "/scLogo.png";
}
use of net.minecraftforge.common.config.Configuration in project Minechem by iopleke.
the class Config method init.
public static void init() {
if (config == null) {
config = new Configuration(new File(Compendium.Config.configPrefix + "Minechem.cfg"));
loadConfig();
}
}
use of net.minecraftforge.common.config.Configuration in project PneumaticCraft by MineMaarten.
the class MainHelmetHandler method saveToConfig.
@Override
public void saveToConfig() {
Configuration config = Config.config;
config.load();
if (powerStat != null) {
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Power_Stat", "stat X", -1).set(powerStat.getBaseX());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Power_Stat", "stat Y", 2).set(powerStat.getBaseY());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Power_Stat", "stat leftsided", true).set(powerStat.isLeftSided());
powerStatX = powerStat.getBaseX();
powerStatY = powerStat.getBaseY();
powerStatLeftSided = powerStat.isLeftSided();
}
if (testMessageStat != null) {
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Message_Stat", "stat X", 2).set(testMessageStat.getBaseX());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Message_Stat", "stat Y", 2).set(testMessageStat.getBaseY());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Message_Stat", "stat leftsided", false).set(testMessageStat.isLeftSided());
messagesStatX = testMessageStat.getBaseX();
messagesStatY = testMessageStat.getBaseY();
messagesStatLeftSided = testMessageStat.isLeftSided();
messagesStatX = testMessageStat.getBaseX();
messagesStatY = testMessageStat.getBaseY();
messagesStatLeftSided = testMessageStat.isLeftSided();
}
config.save();
}
use of net.minecraftforge.common.config.Configuration in project PneumaticCraft by MineMaarten.
the class SearchUpgradeHandler method saveToConfig.
@Override
public void saveToConfig() {
Configuration config = Config.config;
config.load();
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Item_Search", "stat X", -1).set(searchInfo.getBaseX());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Item_Search", "stat Y", 17).set(searchInfo.getBaseY());
config.get("Helmet_Options" + Configuration.CATEGORY_SPLITTER + "Item_Search", "stat leftsided", true).set(searchInfo.isLeftSided());
config.save();
statX = searchInfo.getBaseX();
statY = searchInfo.getBaseY();
statLeftSided = searchInfo.isLeftSided();
}
Aggregations