REI Configuration Files are located in minecraft/config/roughlyenoughitems folder, and is only loaded on the client as all options are client-only.

ConfigManager, the class responsible for loading the config, loads the REI config on mod initialization.

Accessing Configuration Options

REI Configuration Options / KeyMappings are accessible with ConfigObject.getInstance().

<aside> 📖 Work has started on documenting what each configuration option does! Please read the JavaDocs on the methods!

</aside>

Modifying Favorites List

ConfigObject.getFavoriteEntries() returns the List-view of the favorites list, this automatically handles favorites that are by default visible, and manages the back-end data.

Accessing Configuration Screen

REI uses Cloth Config to display the Config Screen, but does its own customization to it for adding custom texts and widgets, this is why it looks different than most Cloth Config screens.

Retrieve the config screen by using ConfigManager.getConfigScreen(parent), this method expects the previous screen so that it knows what screen to return to after saving the config.

Injecting to the Configuration Screen for REI Addons

<aside> 🚧 Experimental Feature! ConfigAddon was introduced in REI 8.3!

</aside>

In a client plugin (Constructing Plugins), override registerConfigAddons, from here, you may implement a new ConfigAddon.

Config addons are shown inside the REI config screen for easy access and organization, you may specify the title and description of the addon for easy identification for the user.

Under createScreen, create a new configuration, REI does not handle this for you. Here, you can use any configuration screen libraries, such as Auto Config that REI uses, or just roll your own.

Remember to return to the parent screen that REI passes to you after completion.