JustEnoughItems icon indicating copy to clipboard operation
JustEnoughItems copied to clipboard

Make clientside config editable with Configured on Forge 1.19.2

Open stepa2 opened this issue 1 year ago • 8 comments

Fixes #3139.

I exported IClientConfigs to public API to make it accessible from ForgeGuiPlugin and FabricGuiPlugin. FabricGuiPlugin has a hack with casting to concrete implementation of IClientConfigs, when proper configuration support on fabric will be added, that hack will be not needed.

Also added Configured as development dependency for Forge and updated development version of Forge.

stepa2 avatar Mar 06 '23 21:03 stepa2

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 06 '23 21:03 CLAassistant

All tests are passed, spotless check is passed

stepa2 avatar Mar 06 '23 21:03 stepa2

Thank you for contributing! Unfortunately, I think this may be a duplication of effort. I have been in contact with the author of Configured and written a different solution here: https://github.com/MrCrayfish/Configured/pull/83 I will be able to backport the solution to 1.19.2 once the PR is accepted by MrCrayfish.

mezz avatar Mar 07 '23 00:03 mezz

My solution is not Configured-dependent, it will work with all Forge mods that access configs of other mods. Also, as you support Fabric as well, you'll still need to do refactoring similar to mine to register clientside configs in Fiber.

stepa2 avatar Mar 07 '23 07:03 stepa2

I think that sounds beneficial. There are some things to overcome here in the review here though.

For PRs, we must target the latest version of JEI and then we can backport to any version you would like. In this case, we need this first PR to target 1.19.3.

The dependency structure of JEI is like this:

             /\
            /  \
           /    \
          /      \
         / forge  \
        / & fabric \  (These depend on everything below)
       /------------\
      /      |       \
     /  gui  |library \  (These depend on the lower levels, but are not connected to each other)
    /------------------\
   /      common        \  (Depends on core, and Minecraft is available here)
  /----------------------\
 /         core           \  (mostly plain Java)
/--------------------------\

So for anything you need accessible in forge and fabric, it doesn't need to go in the API at all. Core should have no dependencies on high levels like common api. I think the config files are organized a little better in the 1.19.3 branch.

mezz avatar Mar 10 '23 01:03 mezz

Hello, sorry to bother, but do i need to change something manually or will it be implemented in next update? If its the first one option, how should i do it...sorry i am not very good in that "programming" stuff xD

Daraphin avatar Mar 11 '23 14:03 Daraphin

@Daraphin We will have to wait for the developer to backport the change https://github.com/mezz/JustEnoughItems/commit/4128bf4261e025ce10e0d8b4be70f83826f3dc1f to 1.19.2. The Configured change referenced earlier https://github.com/mezz/JustEnoughItems/pull/3148#issuecomment-1457257429 has already been merged and released for 1.19.2. For now you can edit configs manually through files or use an alternative.

zerebos avatar Apr 16 '23 04:04 zerebos

@Daraphin We will have to wait for the developer to backport the change 4128bf4 to 1.19.2. The Configured change referenced earlier #3148 (comment) has already been merged and released for 1.19.2. For now you can edit configs manually through files or use an alternative.

(Oh i figured it out so no need for help anymore)

Yeah problem is i need this fix for 1.18.2 :X and sorry for late response completly forgot i asked here...

Daraphin avatar May 14 '23 15:05 Daraphin