Repository navigation
For Developers
Applies to Regalia Slots API 1.0.2 for Minecraft 1.21.1, and to 1.1.4 for 26.2.
repositories {
maven {
name = "RegaliaSlotsApi"
url = uri("https://gitlab.com/api/v4/projects/<project-id>/packages/maven")
}
}
dependencies {
runtimeOnly "com.skd.regaliaslotsapi:regalia_slots_api-neoforge:${version}"
compileOnly "com.skd.regaliaslotsapi:regalia_slots_api-neoforge:${version}:api"
}runtimeOnly for normal operation, compileOnly for the api classifier when you are writing
against the API. Replace ${version} with the version you want.
Package com.skd.regaliaslotsapi.api. This is the supported surface and the one that will not be
removed. Notable types:
| Type | Purpose |
|---|---|
RegaliaSlotsApi |
Entry point. |
SlotType |
The slot type itself, built through a builder. |
SlotPredicate |
Filters — reads a slots list from JSON. |
SlotContext / SlotResult
|
Slot interaction callbacks. |
SlotAttribute |
Attribute handling for slotted items. |
RegaliaSlotsApiTags |
The tag conventions. |
RegaliaSlotsApiCapability |
The inventory capability. |
Use the SlotType builder, not SlotTypePreset. The preset enum is deprecated and scheduled for
removal in Minecraft 1.22 — see Slots.
Package top.theillusivec4.curios.api. A verbatim copy of Curios' API package, present so mods
compiled against real Curios load and work.
You may code against it, and that is the point. But it is someone else's API under someone else's namespace, it comes with the gaps listed in Curios Compatibility, and it is not where new Regalia features will land.
Slots are on demand. Nothing appears because you registered a type — it appears because a type exists and something can occupy it, or because a player forces it.
The flow:
- Build a
SlotTypewith an identifier, an icon, an order and a validator. - Declare which entities may have it — by default via
data/regalia_slots_api/tags/entity_type/player_like.json. - Tag the items that belong in it, under
data/<yournamespace>/curios/slots/<slot>.json.
Identifiers are the merge key. Two mods registering the same identifier get one slot, not two.
That is deliberate — it is what stops a dozen mods each adding their own ring — but it means the
identifier you pick is a shared namespace. Pick something namespaced if you mean something specific.
Categorising an item into a slot needs no code. A JSON file under
data/<yournamespace>/curios/slots/ is enough, and a datapack can override the lot.
A slot file declares an order, an icon and a list of validators. The default validator is the
tag validator, so the slot's contents are defined by item tags.
A player can be given or have taken a number of slots of a given type through the API, and slots can be enabled or disabled per player. The same operations are available to server operators as commands — see Commands.
SlotTypePreset is deprecated and scheduled for removal in 1.22. It also lists only ten entries
and omits feet, so anything using it will not see that slot. Build through SlotType instead.
The build system is Curios', not the studio standard. This fork keeps Curios' original Gradle
setup — version/group/mod_id keys and generated mod metadata — rather than the
net.neoforged.moddev template with mod_version/mod_group_id. Do not force the standard
template onto it; the original architecture is kept to avoid breaking the build.
Per-item custom behaviour does not work through the Curios path. ICurioItem / ICurio is not
bridged. If your mod depends on custom sounds, glow or tooltips, code against the Regalia API.
There are roughly 46 inherited deprecation warnings in a clean build, carried over from Curios' own unfinished migration to NeoForge's newer item APIs. They are known and are being left alone. An automated cleanup was attempted once and broke slot validation and changed a public method signature, so it was reverted — do not retry it blind. Wait for Curios to finish its own migration and port their real fix.
The top/theillusivec4/curios/ tree and the Curios* classes under the compatibility package look
like leftovers from the fork. They are not. They are what makes binary compatibility with mods
compiled against real Curios possible, and removing them breaks every one of those mods.
Regalia Slots API is by Stalking Dragons, licensed LGPL-3.0-or-later. It is a fork of Curios API by TheIllusiveC4, who retains full credit for the original design and implementation. Not affiliated with or endorsed by them. See Credits and License.