Search in sources :

Example 1 with Option

use of net.moddingplayground.frame.api.config.v0.option.Option in project frame-fabric by moddingplayground.

the class Config method addConfigListEntries.

@Environment(EnvType.CLIENT)
public void addConfigListEntries(ConfigEntryBuilder entryBuilder, Supplier<ConfigCategory> categoryCreator) {
    if (this.canDisplayInMenu()) {
        ConfigCategory category = categoryCreator.get();
        for (Map.Entry<Identifier, Option<?>> entry : this.getDisplayedOptions().entrySet()) {
            Identifier id = entry.getKey();
            Option<?> option = entry.getValue();
            option.addConfigEntries(category, id, entryBuilder);
        }
    }
}
Also used : Identifier(net.minecraft.util.Identifier) ConfigCategory(me.shedaniel.clothconfig2.api.ConfigCategory) StandardCopyOption(java.nio.file.StandardCopyOption) Option(net.moddingplayground.frame.api.config.v0.option.Option) Map(java.util.Map) HashBiMap(com.google.common.collect.HashBiMap) Environment(net.fabricmc.api.Environment)

Aggregations

HashBiMap (com.google.common.collect.HashBiMap)1 StandardCopyOption (java.nio.file.StandardCopyOption)1 Map (java.util.Map)1 ConfigCategory (me.shedaniel.clothconfig2.api.ConfigCategory)1 Environment (net.fabricmc.api.Environment)1 Identifier (net.minecraft.util.Identifier)1 Option (net.moddingplayground.frame.api.config.v0.option.Option)1