本文整理汇总了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());
}
}
示例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();
}
}
示例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();
}
}
}
}
示例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());
}
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
}
示例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);
}
}