
MenuKit: Containers
Slot extension for MenuKit — custom container menus, per-slot state, slot-group regions. Requires MenuKit.
- Загрузки
- 89
- Подписчики
- 0
- Обновлён
- 2 июля 2026 г.
- Лицензия
- MIT
Опубликован 16 мая 2026 г.
MenuKit: Containers
MenuKit: Containers is a slot extension for MenuKit. It lets mods add slots that persist, whether in custom container menus or placed where vanilla never had them.
What it does:
- Creates slots as UI components, placed like any other: a pocket, an extra equipment slot, a satchel, each real and server-synced.
- Adds custom container menus that integrate with MenuKit's panels.
- Attaches per-slot state to any slot: server-authoritative, auto-synced, and either per-player-private or shared across all viewers.
- Makes created slots behave like vanilla ones: identical in creative and survival; correct on death (drop, keep with keepInventory, or destroy with Curse of Vanishing) and grave-mod aware; with optional Curse of Binding and XP Mending.
- Shows a registered slot on every container screen (creative, survival, and foreign menus) without per-screen setup.
- Reaches placed containers: double-chest resolution, server-side reads with no open menu, and a client-capability check.
- Stores each slot's state on its natural owner (the player, block, entity, or item), readable with
/data get. - Exposes every slot it creates to any MenuKit consumer, so other mods can see and address your slots, and you theirs. Slots and menus from different mods register cleanly and coexist, keeping mods compatible with each other.
MenuKit: Containers is universal (runs on client and server) and depends on MenuKit, which it pulls in automatically. Requires Fabric.
Install
repositories {
maven { url 'https://api.modrinth.com/maven' }
}
dependencies {
modImplementation 'maven.modrinth:menukit-containers:2.0.0'
// MenuKit comes in transitively, no need to declare it separately
}
Declare both in fabric.mod.json:
"depends": { "menukit": "*", "menukit-containers": "*" }
Working examples
The validator-mkc mod is the honest reference consumer, with real, compiling usage of created slots, per-slot state, death/binding/mending, and the rest. The full surface is documented in the javadoc.
License
MIT. See LICENSE.
Issues
Ченджлог
2.0.0Релиз1.21.11 · 2 июля 2026 г.
MenuKit: Containers 2.0.0
Built on MenuKit 2.0. A clean API break.
Create a slot once; interact with it through one window - the same window that speaks to vanilla slots.
- Created slots as panel elements - real, server-synced, persistent; on the player inventory, placed containers, or foreign menus.
- Vanilla parity for free - identical in creative and survival; correct death behavior (drop / keep on keepInventory / destroy on Curse of Vanishing), grave-mod aware; opt-in Curse of Binding and XP Mending.
- Container parity - register a slot panel once, it appears on every container screen (creative and foreign menus included), no per-screen wiring.
- Shared or private per-slot state; placed-container reach (double-chest resolution, menu-free reads, capability query).
- Persistence on the natural owner (player, block, entity, item), inspectable with /data get.
Requires MenuKit 2.0.0. Breaking: the old graft/slot API does not compile against 2.0.
1.0.0Релиз1.21.11 · 16 мая 2026 г.
MenuKit: Containers 1.0.0
Initial release. The slot extension for MenuKit — custom container menus, per-slot state, slot-group regions, contract verification.
Depends on MenuKit 1.0.0. Depending on MKC pulls in MenuKit transitively (via api); consumer mods only need to declare MKC as a dependency to get both.
What's in
MenuKitScreenHandler— container-menu handler designed for clean integration with MK's panel system.MenuKitHandledScreen— screen-side companion that combines MK panels with vanilla slots in one frame.- Per-slot state (M1) — server-authoritative state attached to individual slots; auto-synced to the client.
- Slot-group regions — group slots into named regions; anchor MK panels to those regions just like menu regions.
- Storage primitives —
Storage,KeyedStorage,PlayerStorage,EphemeralStorage,StorageAttachmentcover most container patterns. - Custom payloads for the slot-state protocol; the pattern is reusable for your own typed payloads.
- Contract verification harness for slot/UI invariants.
Side support
Universal (environment: "*") — runs on both client and server.
Комментарии
Загружаем…