Forge Config API Port

Forge Config API Port

29M Downloads

📖 About:

Forge Config API Port is a modding library for the Fabric ecosystem providing the whole Forge config api. If you are a user, this means this mod does nothing on it's own and you should only install it when using another mod that depends on it.

Install the Configured mod by MrCrayfish if you want in-game configuration!

This port became necessary as I wasn't able to find an existing config api on Fabric which suited my needs, also I have a bunch of code built on top of Forge's api, so just porting the api was the easiest solution. Any other dev seeking to use the Forge config api on Fabric to maintain their project(s) on both loaders is welcome to use this library. Instructions on how to add Forge Config API Port to your development workspace can be found on the GitHub page.

If you're using a multiloader Gradle setup for your workspace, e.g. as demonstrated here by Jared, Forge Config API Port is especially useful, as it can be directly added to the common sub project, so that all Forge config features can be used in any sub project, mod loader specific code only being required once when registering configs. It's really neat, believe me!

Editing configs directly in-game has not yet been implemented. Instead when in a world run the /config showfile <modid> command by choosing either CLIENT, COMMON, or SERVER (depending on the mod), then click the file name (ending with .toml) that appears in chat to be able to manually edit the config file in a separate editor. After saving the file, the config will automatically reload in-game after a couple of seconds, so no game restart required.

Default in-game configuration will be added when the related PR is finalized and merged into Forge. Since the approach the Forge team is taking for configs screens is rather basic, I'm also planning on providing my Config Menus for Forge mod for Fabric, to offer in-game configuration in a more user-friendly and feature packed manner.

More information concerning the licensing of this project and additional information for other developers can be found on the GitHub repo.

🏆 Credits:

Developing Forge Config API Port was helped and inspired by:

  • The whole Forge team, they really did a great job putting together this config api for Forge.

Reddit