
Unified API
A multiloader API built to enable easy cross-loader mod development
Unified API
Unified API is a cross-loader API for both Fabric & NeoForge that enables you to create multiloader mods at no additional effort.
This is accomplished through Unified API's custom registries, events and helpers which replace the need for platform-specific code in favour of using Unified API's common-friendly, well-documented alternatives.
Unified API has no dependencies - simply Fabric API for Fabric, or base NeoForge for NeoForge.
For comprehensive documentation alongside a setup guide, check out unified-api.dev
Why use the Unified API over another API?
- Deferred Registries allow you to register content for any vanilla or modded registry
- a ton of easy-to-use, documented events - including some extremely powerful ones such as the Loot Table, Default Data Component or Biome Modification events
- helper methods to handle any common loader-specific code, often in ways that further expand functionality (such as BLOCK_CONVERSIONS, STRUCTURE_MUSIC or CREATIVE_ENTRIES)
- data-component-driven functionality such as furnace fuel or compost components
- no breaking changes to the API in the same Minecraft version, and changes made between full MC releases of the API are thoroughly documented in the migration guide
- consistent ports to the latest versions, with features designed with them in mind
Registries include:
- Deferred Registry
- Items
- Blocks
- Entity Types
- Block Entity Types
- Creative Tabs
- Data Component Types
- Sound Events
- Key Mappings
Helpers include:
- Platform (check for mods / modloader / other instance information)
- Packs (register internal data / resource packs)
- Creative Entries (insert items to creative tabs)
- Networking (register, send & handle packets)
- Biome Modifications (akin to the fabric biome api, easily modify the features, carvers, effects, attributes or climate of any biome)
- Block Conversions (custom block swapping behaviour such as strippable logs)
- Particle Providers (create custom particles for the client)
- Entity Renderers (setup rendering for custom entity / block entity models & textures)
- Tooltips (bind custom client tooltip information to a tooltip, similarly to bundles)
- Data Components (append custom components to blocks / items such as furnace fuel or compost behaviour, or any other component)
- Structure Music (register unique music pools to any structure)
- Legacy Baby Armor (automatically resize, and optionally rescale, adult armor to match baby mobs without requiring dedicated textures)
Events include:
- Default Data Components (filter for & modify the default components on any item)
- Loot Tables (append any loot table with new pools, or directly edit existing loot entries)
- Commands (create custom commands)
- Players (run code on player events such as join/leave/respawn)
- Ticks (run code at the start / end of client ticks, such as custom keybind code)
- Guis (append hud rendering such as crosshair and hotbar rendering)
- Screens (access AbstractContainerScreen in order to create custom mouse behaviour)
- Servers (run code on server start / stop / datapack load / server ticks / level ticks)
Components include:
- Furnace Fuel (easily specify custom furnace fuel durations for any item)
- Compost (make any item compostable with a given float chance)
Tags include:
- Persistent Cooldowns (enforce item cooldowns on tagged items per-player between world loads)
Once again, be sure to check out unified-api.dev for documentation and the full feature set.
