Mod Menu

Mod Menu

51M Downloads

List of nested class does not appear in mod menu

cppietime opened this issue ยท 1 comments

commented

When a config contains a List<T> of some nested config class T, it does not appear in the mod menu. For example:

@Modmenu(modId = MOD_ID)
@Config(name = "modconfig", wrapperName = "ModConfig")
public class ModConfigModel {
    public static class NestedConfig {
        public NestedConfig (String name, boolean enabled) {
            this.name = name;
            this.enabled = enabled;
        }
        public String name;
        public boolean enabled;
    }

    public String testString = "testString";

    @Expanded
    public List<NestedConfig > list = List.of();

    @Nest
    public NestedConfig  nested = new NestedConfig ("conf", false);

    public List<String> testStrings = List.of("test");
}

testString, nested, and testStrings all appear in the mod menu, but list does not.

commented

Mod Menu does not handle the creation of configuration screens. You should likely open an issue with the configuration library you are using instead.