This page covers the direct Java bindings exposed by MnaJSPlugin.registerBindings(...).
Use this page when you want the exact global names available in KubeJS. For typed ids, state helpers, pattern helpers, and Probe notes, also see Helpers And Probe.
Core Spell And Affinity Bindings
These globals are available directly in scripts:
AffinityAttributeSpellAttributeComponentApplicationResultSpellTargetMnaShapesMnaModifiers
Use them when a callback needs real M&A constants or result values instead of ids:
Affinityfor faction, spell, and power alignment checksAttributeorSpellAttributefor component and modifier attribute definitionsComponentApplicationResultfor spell-effect callback return valuesSpellTargetfor shape targeting callbacks and target inspectionMnaShapesandMnaModifierswhen you want existing built-in M&A shape or modifier constants
Example:
/*** @type {Internal.CustomSpellEffect$Builder}*/const builder = event.create("kubejs:arcane_pulse", "basic");builder.affinity(Affinity.ARCANE).addAttribute(Attribute.RANGE, 1.0, 1.0, 4.0, 0.5, 0.25).applyEffect((source, target, modificationData, context) => {return ComponentApplicationResult.SUCCESS;});
Notes:
SpellAttributeis an alias binding forAttribute.- Prefer typed ids when an API accepts ids. Use these bindings when the API really expects constants, enums, or callback return values.
Construct System Bindings
These globals expose the construct system directly:
MnaConstructTasksConstructCapabilityConstructSlotConstructMaterialItemConstructPartConstructTaskConstructAITaskConstructAITaskParameterConstructParameterTypesConstructTaskBooleanParameterConstructTaskIntegerParameterConstructTaskItemStackParameterConstructTaskPointParameterConstructTaskAreaParameterConstructTaskFilterParameterConstructMutexArmsConstructMutexHeadConstructMutexLegsConstructMutexTorso
Practical use:
MnaConstructTasksis the main script-facing entry for reusing an existing M&A task inbasedOn(...)oraiTask(...).ConstructCapability,ConstructSlot, andConstructMaterialare available directly, but registry-facing MnaJS APIs should still prefer typed ids or the matching lower-case strings where supported.- The parameter and mutex classes matter for advanced construct-task metadata or inspection work, not for normal recipe authoring.
Example:
StartupEvents.registry("mna:construct_task", (event) => {/*** @type {Internal.CustomConstructTask$Builder}*/const builder = event.create("kubejs:scripted_wait", "basic");builder.basedOn(MnaConstructTasks.WAIT).aiTask(MnaConstructTasks.WAIT).texture("mna:textures/gui/construct_tasks/wait.png");});
Notes:
- Current construct-task scripting is metadata-driven reuse of an existing Java AI task, not authoring a new JS-native
ConstructAITaskimplementation. - For construct part registration, prefer typed ids such as
material("kubejs:moonsteel")andslot("head")instead of passing raw Java objects unless a callback explicitly needs them.
Tier Bindings
Direct tier globals:
TierTiers
Use them when a surface expects a vanilla tool tier constant rather than an M&A typed id.
Example:
StartupEvents.registry("item", (event) => {event.create("kubejs:moonsteel_wand_core", "tiered_item").tier(Tiers.DIAMOND);});
Utility Binding Catalog
These globals are also bound directly and are documented in more depth on Helpers And Probe:
CollectionUtilsMATagsMathUtilsBiomeUtilsProjectileHelperPlayerMagicPlayerProgressionProgressionEventsWorldMagicInventoryUtilitiesRecipeUtilMnaPatternHelperMnaRitualReagent
Use this page as the name index and the helper page as the usage guide.
Server-Only Bindings
These globals are only exposed in server scripts:
MNARecipesHelperProgressionEventIDsStructureUtilsEntityUtilSummonUtilsShearHelperMnaFactionUtilManaItemUtilMnaEntityHelperMnaFactionRaidHelper
Use them for low-level recipe JSON generation, structure queries, entity and summon helpers, shearing checks, item mana lookups, and faction-raid integration.
Client-Only Bindings
These globals are only exposed in client scripts:
WorldRenderUtilsGuiRenderUtilsParticleConfigurations
Use them for client-side rendering helpers only. Do not call them from server_scripts.