Tags
Creators
Details
5.0.0+26.2
Compatibility
Required content
Changes
5.0.0: Slots now say what they are and what may be done to them, and placement names its parts. Three changes, one of them breaking.
Slot groups are a registry. Created slot groups appear next to the vanilla categories, and the registry answers without a menu open. SlotGroupCategories.all() lists every category that exists. SlotGroupCategories.of(menu) lists the slots in each category on an open menu. SlotGroupCategories.categoriesBySlot(menu) answers per slot. A mod mints its own category when no vanilla one fits.
Operations are a named, open vocabulary. An operation is a bulk or shortcut action on a slot. Vanilla ships three: shift-click (QUICK_MOVE), double-click collect (COLLECT), and drag-fill (DRAG_FILL). Any mod defines its own operation as a BehaviorKey and publishes it with SlotOperations.define, so other mods find it through SlotOperations.all(). A slot resolves an operation from its own declaration first, then its group, then the group's category, then the key's default. That order is specificity, not load order, so two mods declaring at different levels no longer depend on which loaded first. SlotOperations.inherent(category, operation, value) sets a category-wide answer once. COLLECT and DRAG_FILL are window keys on any slot kind; Containers enforces them at vanilla's own seams.
Placement has two named parts. A reference is the rectangle a panel is measured against. A region is where the panel sits relative to it. Four region enums are now two, named for the vocabulary instead of the reference they implied. OutsideRegion holds the eleven placements outside a rectangle. InsideRegion holds the nine spots on one. Reference replaces ScreenBounds and SlotGroupBounds, which were the same record.
A panel anchored to a slot group is measured from that one group, not from every slot sharing its category. A created group can no longer move a panel anchored to a vanilla one. SlotGroupPanelAdapter.onGroup(SlotGroupId...) anchors to a created group by id.
Breaking: MenuRegion and SlotGroupRegion are OutsideRegion. HudRegion and ScreenRegion are InsideRegion. ScreenBounds and SlotGroupBounds are Reference. HudRegion.CENTER_CROSSHAIR_CLEARANCE is RegionConstants.CENTER_CROSSHAIR_CLEARANCE. Replace the type names; the constant names inside each enum are unchanged. The registry and operations add API and break nothing on their own.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:3vGajyPr:pYm9RIgT"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:3vGajyPr:pYm9RIgT"
}

