Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Sodium Options API

Sodium Options API

Config API for adding Sodium options with a better categories menu

2.84M
239
Optimization
Utility
AboutGalleryChangelogVersions

banner

This mod adds cross-platform events for adding Sodium/Embeddium options menu integration. For example, you can add an option page to Embeddium on Forge, Fabric Sodium 0.5 on 1.20.1, and Fabric/NeoForge Sodium 0.6 on 1.21.1 with one event:

OptionGUIConstruction.EVENT.register((pages) -> pages.add(new TestOptionPage()));

If you're an end user, and you don't have this mod installed already as a library for another Sodium addon, you can install it alongside Reese's Options to get improved category menu, with drop-down support so that it's easier to navigate. This will take effect even for mods that don't use this API and inject into Sodium options directly.

demo

This mod is partially a fork of the Embeddium categories API and options events, with heavy changes to support upstream Sodium. While it makes changes to the Reese's Sodium Options menu, it does so via mixin for compatibility reasons, so you will need to install both.

Using the API

First, you will need to add this mod to your dev environment, using the Maven release for Curseforge or Modrinth.

modImplementation("maven.modrinth:sodium-options-api:version")

Then, this mod provides three events in toni.sodiumoptionsapi.api:

  • OptionGUIConstruction.EVENT, called once in the GUI constructor, allows adding entire pages. This is probably the one you want.
  • OptionPageConstruction.EVENT, called for each OptionPage. Use this if you want to add a group of toggles to the performance tab or something.
  • OptionGroupConstruction.EVENT, called for each group of options. Use this if you want to insert a single option into an existing group, or modify the vanilla ones.

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Compatibility

Minecraft: Java Edition

1.21.1
1.20–1.20.1

Platforms

Fabric
Forge
NeoForge

Supported environments

Client-side

Links

Report issues View source Join Discord server

Creators

Txni
Txni Member

Details

Licensed LGPL-3.0-only
Published 8 months ago
Updated 2 months ago

Modrinth is open source.

main@aaf125c

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.