当前位置: 首页>>代码示例>>Java>>正文


Java OnConfigChangedEvent类代码示例

本文整理汇总了Java中net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent的典型用法代码示例。如果您正苦于以下问题:Java OnConfigChangedEvent类的具体用法?Java OnConfigChangedEvent怎么用?Java OnConfigChangedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OnConfigChangedEvent类属于net.minecraftforge.fml.client.event.ConfigChangedEvent包,在下文中一共展示了OnConfigChangedEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@Override
public void onConfigChanged(OnConfigChangedEvent ev)
{
    if (ev.configID.equals(MalmoMod.SOCKET_CONFIGS))
    {
        AddressHelper.update(MalmoMod.instance.getModSessionConfigFile());
        try
        {
            ClientStateMachine.this.initialiseComms();
        }
        catch (UnknownHostException e)
        {
            // TODO What to do here?
            e.printStackTrace();
        }
        ScreenHelper.update(MalmoMod.instance.getModPermanentConfigFile());
    }
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:19,代码来源:ClientStateMachine.java

示例2: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent ev)
{
	if (ev.modID == MalmoMod.MODID)	// Check we are responding to the correct Mod's event!
	{
		this.stateEpisodeLock.readLock().lock();
		if (this.stateEpisode != null && this.stateEpisode.isLive())
		{
			this.stateEpisode.onConfigChanged(ev);
		}
		else
		{
			//TODO - should we make sure this config change is acted on?
		}
		this.stateEpisodeLock.readLock().unlock();
	}
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:18,代码来源:EpisodeEventWrapper.java

示例3: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
/**
 * By subscribing to the OnConfigChangedEvent we are able to execute code when our config screens are closed.
 * This implementation uses the optional configID string to handle multiple Configurations using one event handler.
 */
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event)
{
    if (getMetadata().modId.equals(event.getModID()))
    {
        if ("chunkLoader".equals(event.getConfigID()))
        {
            ForgeChunkManager.syncConfigDefaults();
            ForgeChunkManager.loadConfiguration();
        }
        else
        {
            boolean tmpStairs = disableStairSlabCulling;

            syncConfig(false);

            if (event.isWorldRunning() && tmpStairs != disableStairSlabCulling)
            {
                FMLCommonHandler.instance().reloadRenderers();
            }

        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:29,代码来源:ForgeModContainer.java

示例4: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@Override
public void onConfigChanged(OnConfigChangedEvent ev)
{
    if (ev.getConfigID().equals(MalmoMod.SOCKET_CONFIGS))
    {
        AddressHelper.update(MalmoMod.instance.getModSessionConfigFile());
        try
        {
            ClientStateMachine.this.initialiseComms();
        }
        catch (UnknownHostException e)
        {
            // TODO What to do here?
            e.printStackTrace();
        }
        ScreenHelper.update(MalmoMod.instance.getModPermanentConfigFile());
        TCPUtils.update(MalmoMod.instance.getModPermanentConfigFile());
    }
}
 
开发者ID:Microsoft,项目名称:malmo,代码行数:20,代码来源:ClientStateMachine.java

示例5: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent ev)
{
	if (ev.getModID() == MalmoMod.MODID)	// Check we are responding to the correct Mod's event!
	{
		this.stateEpisodeLock.readLock().lock();
		if (this.stateEpisode != null && this.stateEpisode.isLive())
		{
			this.stateEpisode.onConfigChanged(ev);
		}
		else
		{
			//TODO - should we make sure this config change is acted on?
		}
		this.stateEpisodeLock.readLock().unlock();
	}
}
 
开发者ID:Microsoft,项目名称:malmo,代码行数:18,代码来源:EpisodeEventWrapper.java

示例6: update

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void update(OnConfigChangedEvent event)
{
    if (event.getModID().equals(Lib.MODID))
    {
        loadConfiguration();
        Geolosys.getInstance().configParser.parseOres();
        Geolosys.getInstance().configParser.parseStones();
        Geolosys.getInstance().configParser.parsePredicates();
    }
}
 
开发者ID:oitsjustjose,项目名称:Geolosys,代码行数:12,代码来源:Config.java

示例7: onOnConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onOnConfigChanged(OnConfigChangedEvent event) //yes, this is how i name my event listener methods
{
	if(event.getModID().equals(GlobalXP.MOD_ID))
	{
		GlobalXP.config.save();
		GlobalXP.config.refresh();
	}
}
 
开发者ID:bl4ckscor3,项目名称:GlobalXP,代码行数:10,代码来源:EventHandler.java

示例8: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SuppressWarnings("static-method")
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event) {
  if (event.getModID().equals(modid)) {
    log.info("Updating config...");
    syncConfig(false);
  }
}
 
开发者ID:HenryLoenwind,项目名称:mves,代码行数:9,代码来源:ConfigHandler.java

示例9: onConfigurationChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onConfigurationChangedEvent(OnConfigChangedEvent event)
{
    if (event.getModID().equalsIgnoreCase(Reference.MOD_ID)) {
        // Resync config
        ModConfig.refreshConfig();
        ModConfig.updateBlacklistedMods();
    }
}
 
开发者ID:sidben,项目名称:VisibleArmorSlots,代码行数:10,代码来源:EventHandlerConfig.java

示例10: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event) {
	if(event.getModID().equals(CrystalMod.MODID)) {
		ModLogger.info("Updating crystalmod config...");
		CrystalMod.proxy.readMainConfig();
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:8,代码来源:Config.java

示例11: onConfigChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChangedEvent(OnConfigChangedEvent event)
{
    if (Reference.MOD_ID.equals(event.getModID()))
    {
        loadConfigs(config);

        TickHandler.getInstance().setBlacklistedItems(blacklistedItems);
        TickHandler.getInstance().setWhitelistedItems(whitelistedItems);
        TickHandler.getInstance().setBlacklistedBlocks(blacklistedBlocks);
    }
}
 
开发者ID:maruohon,项目名称:placementpreview,代码行数:13,代码来源:Configs.java

示例12: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event)
{
	if (event.getModID().equals(ARKCraft.MODID))
	{
		syncConfig(config);
	}
}
 
开发者ID:BubbleTrouble14,项目名称:ARKCraft,代码行数:9,代码来源:WeightsConfig.java

示例13: onConfigChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChangedEvent(OnConfigChangedEvent event)
{
    if (Reference.MOD_ID.equals(event.getModID()) == true)
    {
        loadConfigs(config);
    }
}
 
开发者ID:maruohon,项目名称:itemscroller,代码行数:9,代码来源:Configs.java

示例14: onConfigChanged

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChanged(OnConfigChangedEvent event)
{
	if (event.getModID().equals(Reference.MOD_ID))
	{
		config.syncConfig();
	}
}
 
开发者ID:lumien231,项目名称:Chunk-Animator,代码行数:9,代码来源:ChunkAnimator.java

示例15: onConfigChangedEvent

import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent; //导入依赖的package包/类
@SubscribeEvent
public void onConfigChangedEvent(OnConfigChangedEvent event) {
	
	if (KalStuff.MODID.equals(event.getModID())) {
		loadConfigs(config);
	}
}
 
开发者ID:TEAMModding,项目名称:KalStuff,代码行数:8,代码来源:Configs.java


注:本文中的net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。