isXander / isXander/YetAnotherConfigLib

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

Open
#148 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
155
Forks
68
PR merge metrics
No merged PRs in 30d

Description

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);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ConfigClassHandler.generateGui() entry point and the auto-generated GUI flow shown in the issue. Trace where save actions are handled and determine the intended way to execute additional code after saving. Done means the config-class auto GUI supports an explicit on-save action and its behavior is covered by an appropriate test or documented usage example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.