Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.32 KB

003-the-platform-api-module.md

File metadata and controls

39 lines (23 loc) · 1.32 KB

3. The platform API module

Date: 2021-12-29

Status

Accepted

Context

Now that we have platform modules (one for each modloader, and a common module) [1] and API modules [2], we still need a way for addons to integrate with the mod.

Doing so via the common module would be detrimental as it would expose too much code to addons (just like it did in Refined Storage 1).

Decision

Refined Storage will have a modloader-neutral (just like the common module) platform API module which addon mods can use to integrate with Refined Storage.

Moreover, Refined Storage itself will use this platform API module.

The module is named refinedstorage-platform-api.

Consequences

By offering a dedicated platform API module we can much more tightly control API surface.

The platform API module is platform-neutral so addons can decide what modloader they target. Moreover, it saves us time because we don't have to maintain different platform APIs per modloader.

However, if addon mods want to support multiple modloaders, they'll have to create their own abstractions.

References