當前位置: 首頁>>代碼示例>>Java>>正文


Java ConfigChangedEvent.OnConfigChangedEvent方法代碼示例

本文整理匯總了Java中net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent方法的典型用法代碼示例。如果您正苦於以下問題:Java ConfigChangedEvent.OnConfigChangedEvent方法的具體用法?Java ConfigChangedEvent.OnConfigChangedEvent怎麽用?Java ConfigChangedEvent.OnConfigChangedEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraftforge.fml.client.event.ConfigChangedEvent的用法示例。


在下文中一共展示了ConfigChangedEvent.OnConfigChangedEvent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onConfigurationChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event) {
	if (event.getModID().equalsIgnoreCase(Reference.MOD_ID)) {
		if (event.getConfigID().equals(Reference.catOptions)) {
			loadConfig();
		} else if (event.getConfigID().equals(Reference.catFullMapConfig)) {
			Config.fullScreenMap.loadConfig();
		} else if (event.getConfigID().equals(Reference.catLargeMapConfig)) {
			Config.largeMap.loadConfig();
		} else if (event.getConfigID().equals(Reference.catSmallMapConfig)) {
			Config.smallMap.loadConfig();
		} else {
			Logging.logError("Unknown config id: %s", event.getConfigID());
		}

		if (configuration.hasChanged()) {
			configuration.save();
		}
	}
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:21,代碼來源:ConfigurationHandler.java

示例2: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if (event.getModID().equals(Names.MOD_ID)) {
        ConfigManager.sync(Names.MOD_ID, Config.Type.INSTANCE);
        PneumaticCraftRepressurized.logger.info("Configuration has been saved.");
    }
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:9,代碼來源:ConfigHandler.java

示例3: onConfigChange

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void onConfigChange(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if (ToolBelt.MODID.equals(event.getModID()))
    {
        if (config.hasChanged())
            config.save();
        refresh();
    }
}
 
開發者ID:gigaherz,項目名稱:ToolBelt,代碼行數:11,代碼來源:Config.java

示例4: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
	// TF2weapons.syncConfig();
	if (eventArgs.getModID().equals("rafradek_tf2_weapons")) {
		TF2ConfigVars.createConfig();
		if(Minecraft.getMinecraft().player != null)
			TF2weapons.network.sendToServer(new TF2Message.InitClientMessage(TF2weapons.conf));
	}
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:10,代碼來源:TF2EventsClient.java

示例5: configChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void configChanged(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if(event.getModID().equals(Reference.MOD_ID))
    {
        ConfigManager.sync(Reference.MOD_ID, Config.Type.INSTANCE);
    }
}
 
開發者ID:adudewithapc,項目名稱:Teleporting-XP,代碼行數:9,代碼來源:ModConfig.java

示例6: onConfigurationChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if(event.getModID().equalsIgnoreCase(TheOink.MODID))
        //Resync configs
        syncConfiguration();
}
 
開發者ID:OCDiary,項目名稱:TheOink,代碼行數:8,代碼來源:OinkConfig.java

示例7: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
	// TF2weapons.syncConfig();
	if (eventArgs.getModID().equals("rafradek_spin")) {
		syncConfig();
	}
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:9,代碼來源:SpinToWin.java

示例8: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
/**
 * Handles config changed events
 *
 * @param eventArgs The event arguments
 */
@SubscribeEvent
public void onConfigChanged(@Nonnull ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
    if (eventArgs.getModID().equals(Definitions.MOD_ID)) {
        syncConfig(FMLCommonHandler.instance().getSide() == Side.CLIENT);
    }
}
 
開發者ID:CenturionFox,項目名稱:wolfarmor,代碼行數:12,代碼來源:WolfArmorConfiguration.java

示例9: onConfigurationChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if (event.getModID().equalsIgnoreCase(Reference.MOD_ID))
    {
        loadConfiguration();
    }
}
 
開發者ID:Aviv871,項目名稱:TombCraft,代碼行數:9,代碼來源:ConfigurationHandler.java

示例10: onConfigurationChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigurationChangedEvent(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if(Reference.MOD_ID.equalsIgnoreCase(event.getModID()))
    {
        loadConfiguration();
    }
}
 
開發者ID:CorwinJV,項目名稱:AChunkLoader,代碼行數:9,代碼來源:ConfigurationHandler.java

示例11: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if (event.getModID().equals(Metamorph.MODID) && this.config.hasChanged())
    {
        this.reload();
    }
}
 
開發者ID:mchorse,項目名稱:metamorph,代碼行數:9,代碼來源:MetamorphConfig.java

示例12: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
    if (eventArgs.getModID().equals(JEIButtons.MODID)) {
        config.save();
        load();
        JEIButtons.configHasChanged = true;
    }
}
 
開發者ID:univrsal,項目名稱:JustEnoughButtons,代碼行數:9,代碼來源:ConfigHandler.java

示例13: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
	if(!event.getModID().equals(MODID))
		return;

	Config.syncConfig();
}
 
開發者ID:Lordmau5,項目名稱:FFS,代碼行數:8,代碼來源:FancyFluidStorage.java

示例14: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event)
{
    if(event.getModID().equals(Reference.NAME))
    {
        LimitedLives.syncConfig();
    }
}
 
開發者ID:iChun,項目名稱:Limited-Lives,代碼行數:9,代碼來源:EventHandler.java

示例15: onConfigurationChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onConfigurationChanged(ConfigChangedEvent.OnConfigChangedEvent e)
{
	if (e.getModID().equalsIgnoreCase(ARKCraft.MODID))
	{
		// Resync configs
		LogHelper.info("Configs: Configuration has changed, loading.");
		CoreConfig.loadConfiguration();
	}
}
 
開發者ID:BubbleTrouble14,項目名稱:ARKCraft,代碼行數:11,代碼來源:CoreConfig.java


注:本文中的net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。