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


Java ConfigElement类代码示例

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


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

示例1: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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;
}
 
开发者ID:Team-Fruit,项目名称:McHeliPrivacyShield,代码行数:17,代码来源:ConfigGuiFactory.java

示例2: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements()
{
    PROPERTIES.clear();
    ImmutableList.Builder<IConfigElement> builder = ImmutableList.builder();
    Map<String, AuthlibLoginHelper.Data> accounts = AuthlibLoginHelper.getInstance().listAccounts();
    for (Map.Entry<String, AuthlibLoginHelper.Data> entry : accounts.entrySet())
    {
        String name = entry.getKey();
        AuthlibLoginHelper.Data data = entry.getValue();
        boolean skip = data.userid.isEmpty() && !data.accessToken.isPresent();

        String[] choices = skip ? SKIP_CHOICES.toArray(new String[0]) : LOGIN_CHOICES.toArray(new String[0]);
        Property property = new Property(name, choices[0], Property.Type.STRING, choices);
        property.setComment(skip ? SKIP_COMMENT : LOGIN_COMMENT);

        builder.add(new ConfigElement(property));
        PROPERTIES.put(name, property);
    }
    return builder.build();
}
 
开发者ID:ustc-zzzz,项目名称:AuthlibLoginHelper,代码行数:21,代码来源:AuthlibLoginHelperGuiFactory.java

示例3: buildChildScreen

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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"));
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:18,代码来源:ForgeGuiFactory.java

示例4: getElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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;
}
 
开发者ID:MJaroslav,项目名称:ThaumOres,代码行数:17,代码来源:TOGuiConfig.java

示例5: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
  List<IConfigElement> list = new ArrayList<IConfigElement>();
  String[] names = new String[]{
  		Config.CATEGORY_CLIENT,
  		Config.CATEGORY_WORLD,
  		Config.CATEGORY_ENTITY,
  		Config.CATEGORY_ITEM,
  		Config.CATEGORY_BLOCKS,
  		Config.CATEGORY_MACHINE,
  		Config.CATEGORY_MINIONS
  };
  for (String section : names) {
    list.add(new ConfigElement(CrystalMod.proxy.mainConfig.getCategory(section).setLanguageKey(Lang.prefix+"config." + section.toLowerCase())));
  }

  return list;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:18,代码来源:GuiConfigFactoryCM.java

示例6: buildChildScreen

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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"));
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:18,代码来源:ForgeGuiFactory.java

示例7: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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;
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:17,代码来源:ConfigGui.java

示例8: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements()
{
    List<IConfigElement> elements = new ArrayList<IConfigElement>();

    for (String name : Blockbuster.proxy.forge.getCategoryNames())
    {
        ConfigCategory category = Blockbuster.proxy.forge.getCategory(name);
        category.setLanguageKey("blockbuster.config." + name + ".title");

        if (name.indexOf(".") == -1)
        {
            elements.add(new ConfigElement(category));
        }
    }

    return elements;
}
 
开发者ID:mchorse,项目名称:blockbuster,代码行数:18,代码来源:GuiConfig.java

示例9: buildChildScreen

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
@Override
protected GuiScreen buildChildScreen()
{
	Configuration configuration = ModConfiguration.getConfig();
	ConfigElement configurationCategory = new ConfigElement(configuration.getCategory(ModConfiguration.CATEGORY_NUGGETS));
	List<IConfigElement> propertiesOnThisScreen = configurationCategory.getChildElements();
	String windowTitle = I18n.format("uncrafting.options.nuggets");

	return new GuiConfig(this.owningScreen, propertiesOnThisScreen,
		this.owningScreen.modID,
		ModConfiguration.CATEGORY_NUGGETS,
		this.configElement.requiresWorldRestart() || this.owningScreen.allRequireWorldRestart,
		this.configElement.requiresMcRestart() || this.owningScreen.allRequireMcRestart,
		windowTitle
	);

}
 
开发者ID:crazysnailboy,项目名称:UncraftingTable,代码行数:18,代码来源:ModGuiConfig.java

示例10: getElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
public static List<IConfigElement> getElements() {
    buttonorder.clear();
    for (int i = 0; i < JEIButtons.btnCustom.length; i++) {
        buttonorder.add("enableCustomButton." + i);
        buttonorder.add("customName." + i);
        buttonorder.add("customCommand." + i);
    }

    List<IConfigElement> entries = new ArrayList<IConfigElement>();

    for (String name : ConfigHandler.config.getCategoryNames())
        if (name.equals(ConfigHandler.CATEGORY_CUSTOM))
            entries.add(new ConfigElement(ConfigHandler.config.getCategory(name).setPropertyOrder(buttonorder)));
        else
            entries.add(new ConfigElement(ConfigHandler.config.getCategory(name)));


    return entries;
}
 
开发者ID:univrsal,项目名称:JustEnoughButtons,代码行数:20,代码来源:GuiJEBConfig.java

示例11: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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;
}
 
开发者ID:Team-Fruit,项目名称:EEWReciever,代码行数:17,代码来源:ConfigGui.java

示例12: buildChildScreen

import net.minecraftforge.common.config.ConfigElement; //导入依赖的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"));
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:18,代码来源:ForgeGuiFactory.java

示例13: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements() {
	List<IConfigElement> ret = new ArrayList();
	Configuration config = NeiLotr.mod.getConfig().getConfigFile();
	for (String category : config.getCategoryNames()) {
		ret.addAll(new ConfigElement(config.getCategory(category)).getChildElements());
	}
	return ret;
}
 
开发者ID:CraftedMods,项目名称:nei-lotr,代码行数:9,代码来源:DefaultConfigGui.java

示例14: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements()
{
    ArrayList<IConfigElement> list = new ArrayList<IConfigElement>();

    list.add(new ConfigElement(Config.getInstance().FeatureControl));
    list.add(new ConfigElement(Config.getInstance().Samples));
    list.add(new ConfigElement(Config.getInstance().UserEntries));

    return list;
}
 
开发者ID:oitsjustjose,项目名称:Geolosys,代码行数:11,代码来源:ConfigGUI.java

示例15: getConfigElements

import net.minecraftforge.common.config.ConfigElement; //导入依赖的package包/类
private static List<IConfigElement> getConfigElements() {
	List<IConfigElement> configElements = new ArrayList<IConfigElement>();
	Configuration config = ModConfig.CONFIG;
	if (config != null) {
		ConfigCategory categoryClient = config.getCategory(ModConfig.CLIENT_CAT);
		configElements.addAll(new ConfigElement(categoryClient).getChildElements());
	}
	return configElements;
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:10,代码来源:GuiModConfig.java


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