net.minecraftforge.common.config.Config Java Examples
The following examples show how to use
net.minecraftforge.common.config.Config.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EmergingTechnologyConfig.java From EmergingTechnology with MIT License | 5 votes |
/** * Inject the new values and save to the config file when the config has been changed from the GUI. * * @param event The event */ @SubscribeEvent public static void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(EmergingTechnology.MODID)) { ConfigManager.sync(EmergingTechnology.MODID, Config.Type.INSTANCE); } }
Example #2
Source File: I18nConfig.java From I18nUpdateMod with MIT License | 5 votes |
@SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(I18nUpdateMod.MODID)) { ConfigManager.sync(I18nUpdateMod.MODID, Config.Type.INSTANCE); I18nUpdateMod.logger.info("配置文件修改已经保存"); } }
Example #3
Source File: BakaDanmakuConfig.java From BakaDanmaku with MIT License | 5 votes |
@SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(BakaDanmaku.MOD_ID)) { // 重载配置 ConfigManager.sync(BakaDanmaku.MOD_ID, Config.Type.INSTANCE); if (BakaDanmaku.player != null) { // 提示信息 BaseDanmakuThread.sendChatMessage("§8§l配置已经保存,正在重启中……"); // 重载房间信息 DanmakuThreadFactory.restartThreads(); } } }
Example #4
Source File: SPConfigGUI.java From Sound-Physics with GNU General Public License v3.0 | 5 votes |
/** Compiles a list of config elements */ private static List<IConfigElement> getConfigElements() { List<IConfigElement> list = new ArrayList<IConfigElement>(); //Add categories to config GUI list.add(categoryElement(SoundPhysicsCore.configFile.CATEGORY_GENERAL, "General", "soundphysics.configgui.ctgy.general")); list.add(categoryElement(SoundPhysicsCore.Config.categoryPerformance, "Performance", "soundphysics.configgui.ctgy.performance")); list.add(categoryElement(SoundPhysicsCore.Config.categoryMaterialProperties, "Material Properties", "soundphysics.configgui.ctgy.materialProperties")); list.add(categoryElement(SoundPhysicsCore.Config.categoryMisc, "Misc", "soundphysics.configgui.ctgy.misc")); return list; }
Example #5
Source File: CommonHandler.java From GokiStats with MIT License | 5 votes |
@SubscribeEvent public void configChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(Reference.MODID)) { ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); LootConfigDeserializer.reloadAll(); } }
Example #6
Source File: TofuConfig.java From TofuCraftReload with MIT License | 4 votes |
@SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(TofuMain.MODID)) { ConfigManager.sync(TofuMain.MODID, Config.Type.INSTANCE); } }
Example #7
Source File: SakuraConfig.java From Sakura_mod with MIT License | 4 votes |
@SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(SakuraMain.MODID)) { ConfigManager.sync(SakuraMain.MODID, Config.Type.INSTANCE); } }
Example #8
Source File: EventHandlers.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(GTValues.MODID)) { ConfigManager.sync(GTValues.MODID, Config.Type.INSTANCE); } }
Example #9
Source File: GTMod.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(MODID)) { ConfigManager.sync(MODID, Config.Type.INSTANCE); } }
Example #10
Source File: CommonProxy.java From YouTubeModdingTutorial with MIT License | 4 votes |
@SubscribeEvent public void onConfigChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equals(MODID)) { ConfigManager.sync(MODID, Config.Type.INSTANCE); } }
Example #11
Source File: ConfigurationHandler.java From LunatriusCore with MIT License | 4 votes |
@SubscribeEvent public void onConfigurationChangedEvent(final ConfigChangedEvent.OnConfigChangedEvent event) { if (event.getModID().equalsIgnoreCase(Reference.MODID)) { ConfigManager.sync(Reference.MODID, Config.Type.INSTANCE); } }