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