本文整理匯總了Java中cpw.mods.fml.client.config.IConfigElement類的典型用法代碼示例。如果您正苦於以下問題:Java IConfigElement類的具體用法?Java IConfigElement怎麽用?Java IConfigElement使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IConfigElement類屬於cpw.mods.fml.client.config包,在下文中一共展示了IConfigElement類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getConfigElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@SuppressWarnings({ "rawtypes" })
private static @Nonnull List<IConfigElement> getConfigElements() {
final List<IConfigElement> list = new ArrayList<IConfigElement>();
for (final String cat : Config.getConfig().getCategoryNames()) {
final ConfigCategory cc = Config.getConfig().getCategory(cat);
if (cc.isChild())
continue;
final ConfigElement ce = new ConfigElement<String>(cc);
list.add(ce);
}
return list;
}
示例2: getElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
/** Create configuration element list */
private static List<IConfigElement> getElements() {
ArrayList<IConfigElement> list = new ArrayList<IConfigElement>();
List<IConfigElement> listGeneral = new ConfigElement(
ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryGeneral)).getChildElements();
List<IConfigElement> listDebug = new ConfigElement(
ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryDebug)).getChildElements();
List<IConfigElement> listGeneration = new ConfigElement(
ThaumOresMod.config.getInstance().getCategory(TOConfig.categoryGeneration)).getChildElements();
list.add(new DummyCategoryElement(TOConfig.categoryGeneral, TOConfig.categoryGeneral, listGeneral));
list.add(new DummyCategoryElement(TOConfig.categoryDebug, TOConfig.categoryDebug, listDebug));
list.add(new DummyCategoryElement(TOConfig.categoryGeneration, TOConfig.categoryGeneration, listGeneration));
return list;
}
示例3: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig",
ModOverridesEntry.class));
list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());
// This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
// GuiConfig object's propertyList will also be refreshed to reflect the changes.
return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader",
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
I18n.func_135052_a("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
示例4: getConfigElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
private static @Nonnull List<IConfigElement> getConfigElements() {
final List<IConfigElement> list = new ArrayList<IConfigElement>();
for (final String cat : Config.getConfig().getCategoryNames()) {
final ConfigCategory cc = Config.getConfig().getCategory(cat);
if (cc.isChild())
continue;
final ConfigElement ce = new ConfigElement<String>(cc);
list.add(ce);
}
return list;
}
示例5: getConfigElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
private static List<IConfigElement> getConfigElements() {
final List<IConfigElement> list = new ArrayList<IConfigElement>();
for (final String cat : ConfigHandler.instance.getCategoryNames()) {
final ConfigCategory cc = ConfigHandler.instance.getCategory(cat);
if (cc.isChild())
continue;
final ConfigElement ce = new ConfigElement<String>(cc);
list.add(ce);
}
return list;
}
示例6: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen()
{
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement("forgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingModConfig",
ModOverridesEntry.class));
list.addAll((new ConfigElement(ForgeChunkManager.getDefaultsCategory())).getChildElements());
// This GuiConfig object specifies the configID of the object and as such will force-save when it is closed. The parent
// GuiConfig object's propertyList will also be refreshed to reflect the changes.
return new GuiConfig(this.owningScreen, list, this.owningScreen.modID, "chunkLoader",
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
GuiConfig.getAbridgedConfigPath(ForgeChunkManager.getConfig().toString()),
I18n.format("forge.configgui.ctgy.forgeChunkLoadingConfig"));
}
示例7: BaseConfigGui
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@SuppressWarnings("rawtypes")
public BaseConfigGui(GuiScreen parentScreen) {
// dummy super so we can call instance methods
super(parentScreen, new ArrayList<IConfigElement>(), null, false, false, null);
try {
// pffft final, what a wimpy modifier
Field modID = GuiConfig.class.getDeclaredField("modID");
Field configElements = GuiConfig.class.getDeclaredField("configElements");
modID.setAccessible(true);
configElements.setAccessible(true);
modID.set(this, getConfigHandler().getModID());
configElements.set(this, getConfigElements());
} catch (Exception e) {
throw new RuntimeException(e);
}
this.title = getTitle();
}
示例8: getConfigElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
/** Compiles a list of config elements */
@SuppressWarnings("unchecked")
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.addAll(new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements()); //other things from the General category get a separate button
//Add categories to config GUI
list.add(getCategoryElement("drill_tier1", "config.drill_tier1"));
list.add(getCategoryElement("drill_tier2", "config.drill_tier2"));
list.add(getCategoryElement("drill_tier3", "config.drill_tier3"));
list.add(getCategoryElement("drill_tier4", "config.drill_tier4"));
list.add(getCategoryElement("chainsaw_tier1", "config.chainsaw_tier1"));
list.add(getCategoryElement("chainsaw_tier2", "config.chainsaw_tier2"));
list.add(getCategoryElement("chainsaw_tier3", "config.chainsaw_tier3"));
list.add(getCategoryElement("chainsaw_tier4", "config.chainsaw_tier4"));
list.add(getCategoryElement("fluxcrusher", "config.flux_crusher"));
list.add(getCategoryElement("soulcrusher", "config.soul_crusher"));
list.add(getCategoryElement("hoe", "config.hoe"));
return list;
}
示例9: getConfigClasses
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
static List<IConfigElement> getConfigClasses()
{
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement("Chicken", "com.HerdCraft.common.guiconfig.ConfigGUIChicken", ConfigGUIChicken.class));
list.add(new DummyCategoryElement("Cow", "com.HerdCraft.common.guiconfig.ConfigGUICow", ConfigGUICow.class));
list.add(new DummyCategoryElement("Horse", "com.HerdCraft.common.guiconfig.ConfigGUIHorse", ConfigGUIHorse.class));
list.add(new DummyCategoryElement("Pig", "com.HerdCraft.common.guiconfig.ConfigGUIPig", ConfigGUIPig.class));
list.add(new DummyCategoryElement("Sheep", "com.HerdCraft.common.guiconfig.ConfigGUISheep", ConfigGUISheep.class));
list.add(new DummyCategoryElement("Zombie", "com.HerdCraft.common.guiconfig.ConfigGUIZombie", ConfigGUIZombie.class));
list.add(new DummyCategoryElement("Zombie Pigman", "com.HerdCraft.common.guiconfig.ConfigGUIZombiePigman", ConfigGUIZombiePigman.class));
list.add(new DummyCategoryElement("Skeleton", "com.HerdCraft.common.guiconfig.ConfigGUISkeleton", ConfigGUISkeleton.class));
list.add(new DummyCategoryElement("Creeper", "com.HerdCraft.common.guiconfig.ConfigGUICreeper", ConfigGUICreeper.class));
list.add(new DummyCategoryElement("Magnet", "com.HerdCraft.common.guiconfig.ConfigGUIMagnet", ConfigGUIMagnet.class));
return list;
}
示例10: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
if (!Data.converted())
list.add(new DummyCategoryElement(Format.s("config.hud.title"), "ctf.config.HUD", CTFHUD.class));
list.add(new DummyCategoryElement(Format.s("config.chat.title"), "ctf.config.Chat", CTFChat.class));
list.add(new DummyCategoryElement(Format.s("config.alerts.title"), "ctf.config.Alerts", CTFAlerts.class));
list.add(new DummyCategoryElement(Format.s("config.sounds.title"), "ctf.config.Sounds", SoundsEntry.class));
return new GuiConfig(this.owningScreen,
list,
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
Format.s("ctf.config.title"));
}
示例11: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
/**
* This method is called in the constructor and is used to set the childScreen field.
*/
@Override
protected GuiScreen buildChildScreen()
{
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement("addForgeChunkLoadingModCfg", "forge.configgui.ctgy.forgeChunkLoadingAddModConfig",
AddModOverrideEntry.class));
for (ConfigCategory cc : ForgeChunkManager.getModCategories())
list.add(new ConfigElement(cc));
return new GuiConfig(this.owningScreen, list, this.owningScreen.modID,
this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart, this.owningScreen.title,
I18n.format("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
}
示例12: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
if (!Data.converted())
list.add(new DummyCategoryElement(Format.s("config.hud.title"), "mcpvp.config.maze.HUD", MazeHUD.class));
list.add(new DummyCategoryElement(Format.s("config.alerts.title"), "mcpvp.config.maze.Alerts", MazeAlerts.class));
list.add(new DummyCategoryElement(Format.s("config.sounds.title"), "mcpvp.config.maze.Sounds", MazeSounds.class));
list.add(new DummyCategoryElement(Format.s("config.select.title"), "mcpvp.config.maze.Select", MazeSelect.class));
return new GuiConfig(this.owningScreen,
list,
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
Format.s("config.maze.title"));
}
示例13: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement(Format.s("config.friends.title"), "config.friends", AllFriends.class));
list.add(new DummyCategoryElement(Format.s("config.alerts.title"), "config.alerts", AllAlerts.class));
list.add(new DummyCategoryElement(Format.s("config.chat.title"), "config.chat", AllChat.class));
list.add(new DummyCategoryElement(Format.s("config.hud.title"), "config.hud", AllHUD.class));
list.add(new DummyCategoryElement(Format.s("config.select.title"), "config.select", AllSelect.class));
list.add(new DummyCategoryElement(Format.s("config.version.title"), "config.version", AllVersion.class));
list.add(new DummyCategoryElement(Format.s("config.sounds.title"), "config.sounds", AllSounds.class));
list.add(new DummyCategoryElement(Format.s("config.misc.title"), "config.misc", AllMisc.class));
return new GuiConfig(this.owningScreen,
list,
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
Format.s("config.title"));
}
示例14: getConfigElements
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
private static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
list.add(new DummyCategoryElement(Format.s("server.all"), "config.mcpvp", ConfigAll.class));
list.add(new DummyCategoryElement(Server.HG.getName(), "config.hg", ConfigHG.class));
list.add(new DummyCategoryElement(Server.MAZE.getName(), "config.maze", ConfigMaze.class));
list.add(new DummyCategoryElement(Server.CTF.getName(), "config.ctf", ConfigCTF.class));
list.add(new DummyCategoryElement(Server.SAB.getName(), "config.sab", ConfigSab.class));
list.add(new DummyCategoryElement(Server.KIT.getName(), "config.kit", ConfigKit.class));
list.add(new DummyCategoryElement(Server.BUILD.getName(), "config.build", ConfigBuild.class));
list.add(new DummyCategoryElement(Server.RAID.getName(), "config.raid", ConfigRaid.class));
list.add(new DummyCategoryElement(Server.HS.getName(), "config.hs", ConfigHS.class));
list.add(new DummyCategoryElement(Server.SMASH.getName(), "config.smash", ConfigSmash.class));
return list;
}
示例15: buildChildScreen
import cpw.mods.fml.client.config.IConfigElement; //導入依賴的package包/類
@Override
protected GuiScreen buildChildScreen() {
List<IConfigElement> list = new ArrayList<IConfigElement>();
if (!Data.converted())
list.add(new DummyCategoryElement(Format.s("config.hud.title"), "config.smash.hud", SmashHUD.class));
list.add(new DummyCategoryElement(Format.s("config.alerts.title"), "config.smash.alerts", SmashAlerts.class));
list.add(new DummyCategoryElement(Format.s("config.sounds.title"), "config.smash.sounds", SmashSounds.class));
list.add(new DummyCategoryElement(Format.s("config.select.title"), "config.smash.select", SmashSelect.class));
return new GuiConfig(this.owningScreen,
list,
this.owningScreen.modID, Configuration.CATEGORY_GENERAL, this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
Format.s("config.smash.title"));
}