当前位置: 首页>>代码示例>>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;未经允许,请勿转载。