Skip to content
MyoWiki Myotus · 1.21.1

Datagen Conditions

MyoModCondition is a 1.21.1-only NeoForge data condition.

It evaluates to true when a mod ID registered through Myotus integrations is currently active.

Use it when generated data or JSON should only exist if an optional integration is active.

That keeps your data layer aligned with the same integration registry used by runtime code.

{
"type": "myotus:mod_condition",
"active_mod": "ae2wtlib"
}

The active_mod value must be a mod ID that Myotus has registered through IModRegistrar. The codec is registered under myotus:mod_condition in MyoCondition.

Internally, MyoModCondition.test(...) delegates to:

MyotusAPI.modIntegrationManager().isLoaded(modId)

So the condition follows the same registration and version-check pipeline as the rest of the optional integration system.

  • Register the integration first in bootstrap code.
  • Use the same mod ID in your condition JSON.
  • Keep this feature scoped to 1.21.1; the older Forge line does not expose MyoModCondition.