API Overview
Core entry points
Section titled “Core entry points”The Myotus public surface centers on:
MyotusAPIIMyotusAPIIModRegistrarIConfigRegistrarIModIntegrationManagerMyoConfigTabMyoConfigTabContextMyoConfigTabVisibilityMyoModConditionITerminalUpgradeCardTerminalUpgradeHelperTerminalUpgradeStorageKeySafeClass
Access Patterns
Section titled “Access Patterns”MyotusAPI exposes the static convenience entry points:
MyotusAPI.get()MyotusAPI.isInitialized()MyotusAPI.modRegistrar()MyotusAPI.configRegistrar()MyotusAPI.modIntegrationManager()
The fluent registration helpers live on the service interfaces instead:
IMyotusAPI.registerLoadableMod(...)IMyotusAPI.registerConfigTab(...)IModRegistrar.registerLoadableMod(...)IConfigRegistrar.registerTerminalConfigTab(...)IConfigRegistrar.registerTerminalConfigTabs(...)
Main extension areas
Section titled “Main extension areas”Optional integrations
Section titled “Optional integrations”Register an annotation marker against a mod ID, then query whether it is active at runtime.
Item-list integrations
Section titled “Item-list integrations”Use the item-list annotation set plus @MyotusSubscriber to organize JEI, EMI, and REI registration code behind Myotus-managed loader checks. See Item List Integrations.
Terminal config tabs
Section titled “Terminal config tabs”Register new tabs for the terminal settings UI with MyoConfigTab, and gate them per terminal host with MyoConfigTabVisibility.
Runtime integration state
Section titled “Runtime integration state”Check whether a registered integration is currently loaded before touching version-specific behavior.
Datagen conditions
Section titled “Datagen conditions”Gate NeoForge data or JSON output on active Myotus integrations with MyoModCondition. See Datagen Conditions.
Annotation-driven commands
Section titled “Annotation-driven commands”Author Brigadier nodes with @MyoCommand, @MyoExecute, and @MyoArgument instead of hand-building the tree. See Command System.
Terminal upgrade cards and storage
Section titled “Terminal upgrade cards and storage”On 1.21.1, Myotus adds both the ITerminalUpgradeCard hook and the menu/storage layer behind it. See Terminal Upgrade Cards and Upgrade Storage.
Example
Section titled “Example”MyotusAPI.modRegistrar() .registerLoadableMod(MyMarker.class, "examplemod", "[1.0.0,)");
if (MyotusAPI.modIntegrationManager().isLoaded("examplemod")) { // Safe to run the optional integration branch.}Compatibility notes
Section titled “Compatibility notes”1.20.1
Section titled “1.20.1”- The API surface is smaller and less fluent.
MyotusAPI.get()is the main stable entry point.- Registrar interfaces expose the core
loadableMod()andterminalConfigTab()methods. MyoConfigTabdoes not expose per-host visibility rules.- There is no
MyoModConditionor terminal upgrade API in that line.
1.21.1
Section titled “1.21.1”- Adds static convenience methods directly on
MyotusAPI - Adds fluent aliases on
IMyotusAPI,IModRegistrar, andIConfigRegistrar - Keeps
MyotusAPI.isInitialized()alongside the other static accessors - Adds
MyoConfigTabContext,MyoConfigTabVisibility, andvisibleWhen() - Adds
MyoModConditionfor data conditions - Adds
ITerminalUpgradeCard,TerminalUpgradeHelper, and persistent upgrade-slot infrastructure
If you target both lines, code to the common behavior first, then branch only where 1.21.1 adds extra capabilities.