Java API
Java extensions should reuse the existing data definitions, actions, conditions, costs and runtime services first. When adding gameplay, decide on the server-side settlement entry point first, and only then add the client display and the network payload.
- Public API
- Interfaces
- Registries and Data Tables
- Network Protocol and Server Authority
- Hotbar Entries
- Client Screens
Extension Surfaces
| Surface | What an addon can do |
|---|---|
| Datapack registries | Add or override data table entries under data/<namespace>/mxt/; see JSON Data Formats. |
| Attachments | Store per-entity, per-level and per-chunk state in NeoForge attachment types; the mod registers its own in MxtAttachments, for example CULTIVATION, SPIRIT_IDENTITY and RESOURCE_HOLDER, and they are read with entity.getData(...). |
| Actions and conditions | Reuse the built-in entity, bi-entity, block, item and damage action and condition types, or register new built-in types; see Types Reference. |
| Number providers | Supply any numeric field from a constant, an expression or a registered provider type; see Number Provider Types. |
| Formation modules | Add a formation module by writing one FormationActionType record and registering it; see Public API. |
| Information panel | Add your own lines to the character information panel with InformationManager; see Information Panel. |
| Hotbar entries | Add a client-side hotbar entry by implementing HotbarEntry; see Hotbar Entries. |
Next Steps
- Public API — the runtime services an addon calls into, from
AuraServicetoDefinitionText. - Interfaces —
AuraAccess,ItemAuraAccess,UseItemAuraAccess,TooltipAppender,CostandHotbarEntry. - Registries and Data Tables — built-in type registries, the datapack registry list and the codec naming convention.
- Network Protocol and Server Authority — every C2S and S2C payload, and the one channel that carries item contents.
- Information Panel — register your own lines in the character information panel.
- Hotbar Entries — how to add an entry to the client hotbar.
- Client Screens — where the screens live, and how the item picker clones the vanilla creative search tab.
- Types Reference — every built-in action and condition type.
- JSON Data Formats — every field of every data table.
- Datapack Overview — the datapack directory layout and when changes take effect.
- KubeJS API — the scripted alternative for content that does not need Java.