YetAnotherConfigLib

YetAnotherConfigLib

13M Downloads

Feature request: Allow to execute more code in on save when using auto gui

EchoEllet opened this issue ยท 0 comments

commented

Just like title

Currently there is no way to execute some code in on save when using auto gui using config class

public class ModConfig {
    public static ConfigClassHandler<ModConfig> HANDLER = ConfigClassHandler.createBuilder(ModConfig.class)
            .id(new ResourceLocation(GlowingOres.MOD_ID))
            .serializer(config -> GsonConfigSerializerBuilder.create(config)
                    .setPath(FabricLoader.getInstance().getConfigDir().resolve(GlowingOres.MOD_ID + ".json5"))
                    .setJson5(true)
                    .build())
            .build();

    @SerialEntry(comment = "The light for diamond ore block")
    @AutoGen(category = "")
    @IntSlider(min = 0, max = 15, step = 1)
    public int diamondOreLight = 15;
}


    YetAnotherConfigLib gui = ModConfig.HANDLER
                    .generateGui();
            return gui.generateScreen(screen);