use of net.minecraftforge.common.config.ConfigCategory in project MinecraftForge by MinecraftForge.
the class ForgeChunkManager method addConfigProperty.
public static void addConfigProperty(Object mod, String propertyName, String value, Property.Type type) {
ModContainer container = getContainer(mod);
if (container != null) {
ConfigCategory cat = config.getCategory(container.getModId());
Property prop = new Property(propertyName, value, type).setLanguageKey("forge.configgui." + propertyName);
if (type == Property.Type.INTEGER) {
prop.setMinValue(0);
}
cat.put(propertyName, prop);
}
}
use of net.minecraftforge.common.config.ConfigCategory in project VoodooCraft by Mod-DevCafeTeam.
the class VoodooConfig method getEntries.
public static List<IConfigElement> getEntries() {
List<IConfigElement> entries = new ArrayList<IConfigElement>();
Set<String> categories = config.getCategoryNames();
Iterator<String> i = categories.iterator();
while (i.hasNext()) {
String categoryName = i.next();
ConfigCategory category = config.getCategory(categoryName);
entries.addAll(new ConfigElement(category).getChildElements());
}
return entries;
}
use of net.minecraftforge.common.config.ConfigCategory in project MorePlanets by SteveKunG.
the class ConfigManagerMP method getConfigElements.
public static List<IConfigElement> getConfigElements() {
List<IConfigElement> list = new ArrayList<>();
ConfigCategory configGeneral = ConfigManagerMP.config.getCategory(ConfigManagerMP.GENERAL);
configGeneral.setComment(GCCoreUtil.translate("gui.config.mp.general"));
list.add(new ConfigElement(configGeneral));
ConfigCategory configDimension = ConfigManagerMP.config.getCategory(ConfigManagerMP.DIMENSIONS);
configDimension.setComment(GCCoreUtil.translate("gui.config.mp.dimension"));
list.add(new ConfigElement(configDimension));
ConfigCategory configGCAddon = ConfigManagerMP.config.getCategory(ConfigManagerMP.GC_ADDON_COMPAT);
configGCAddon.setComment(GCCoreUtil.translate("gui.config.mp.gcaddon"));
list.add(new ConfigElement(configGCAddon));
ConfigCategory configGUIs = ConfigManagerMP.config.getCategory(ConfigManagerMP.OTHERS);
configGUIs.setComment(GCCoreUtil.translate("gui.config.mp.other"));
list.add(new ConfigElement(configGUIs));
return list;
}
Aggregations