當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。