GirafiStudios / PassthroughSigns

0 stars 1 forks source link

update to forgeconfigapiport v20.4.1, move config builder class to common #18

Closed Fuzss closed 8 months ago

Fuzss commented 8 months ago

As promised quite a while ago I finally made an updated version of Forge Config Api Port that supports Forge and NeoForge as well.

This means in the common subproject you can decide to use either NeoForge's or Forge's config system (by choosing between forgeconfigapiport-common-neoforgeapi or forgeconfigapiport-common-forgeapi as a dependency). There no longer is a unified forgeconfigapiport-common publication as it's not necessary anymore.

As a result, your config builder class has been moved to the common subproject and deleted from all others which will simply inherit from there.

Since the NeoForge config system is used, Passthrough Signs depends on Forge Config Api Port on Fabric & Forge as a result. Passthrough Signs on NeoForge however has no additional dependencies, as the config system is built-in.

Also as promised I made sure the update despite including major refactors is still compatible with previous versions. 😅

Fuzss commented 8 months ago

Would probably also be a great opportunity to move a lot more of the implementation to the common module, like PassableHandler as it's no longer held back by the config options only being available in mod loader specific modules. But that's out of scope for my PR. 😝

GirafiStudios commented 8 months ago

Thank you very much!

For Passthrough Signs & Better Title Screen I had basically just kept the code seperate per modloader, as they are so tiny mods. But you´re right, it would probably make sense in this case, to get stuff moved to Common!

GirafiStudios commented 8 months ago

I think I´m just going to keep things as is for both Passthrough Signs and Better Title Screen, with only a requirement for the Fabric version of the mods.

I´ll get my other multiloader mods "ported" over to 20.4.1 of ForgeConfigApi port though, using the "method" you used in this PR. Appreciate you doing this!

Fuzss commented 8 months ago

It could be worth looking into including FCAP via Jar-in-Jar on Forge (and possibly Fabric) if you want to avoid an additional dependency users must manually download for Passthrough Signs and Better Title Screen.

GirafiStudios commented 8 months ago

Oh you´re okay with Forge Config API Port being used with Jar-in-Jar? That would defenitely be a good way to do it!

Only problem with Jar-in-Jar, is that there is no way to get rid of the -all suffix with ForgeGradle specifically.

Fuzss commented 8 months ago

https://github.com/Fuzss/modresources/blob/f3c79cb2323bd588bddcbdad775145991fe911e7/gradle/forge.gradle#L166

GirafiStudios commented 8 months ago

https://github.com/Fuzss/modresources/blob/f3c79cb2323bd588bddcbdad775145991fe911e7/gradle/forge.gradle#L166

Yeah, that´s what I do for NeoForge - but doesn´t work for me on Forge