MenuKit: Containers

MenuKit: Containers

Slot extension for MenuKit — custom container menus, per-slot state, slot-group regions. Requires MenuKit.

by
17 Downloads
fabriclibrary
Rent Server with this Mod

About this Mod

What it is

MenuKit: Containers (MKC) adds slot machinery to MenuKit. If you're building a Fabric mod with custom container UIs — storage blocks with new slot layouts, inventory mods that need per-slot state, anything that goes through a ScreenHandler — MKC provides:

  • MenuKitScreenHandler — a container-menu handler designed to integrate cleanly with MenuKit's panel system.
  • MenuKitHandledScreen — the 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 and anchor MK panels to those regions, just like menu regions.
  • Custom payloads. Typed networking primitives for slot state, ready to wire into your custom protocol.
  • Contract verification. Built-in validators for slot/UI invariants.

MKC depends on MenuKit. Depending on MKC pulls in MenuKit transitively — you don't need both dependencies in your gradle build.

Install

Add the Modrinth Maven repository and the MKC dependency to your build.gradle:

repositories {
    maven { url 'https://api.modrinth.com/maven' }
}

dependencies {
    modImplementation 'maven.modrinth:menukit-containers:1.0.0'
    // MenuKit is pulled in transitively via api — no need to declare it separately
}

And declare both dependencies in your src/main/resources/fabric.mod.json:

"depends": {
    "menukit": "*",
    "menukit-containers": "*"
}

MKC is universal (environment: *) — runs on both client and server. MenuKit stays client-only.

Quickstart

// 1. Define a screen handler by extending MenuKitScreenHandler
public class MyMenuHandler extends MenuKitScreenHandler {
    public MyMenuHandler(int syncId, Inventory playerInventory, ContainerLevelAccess access) {
        super(MY_MENU_TYPE, syncId, playerInventory);
        // Register slots, set up storage attachments, etc.
        // See MenuKitScreenHandler javadoc for the standard hooks.
    }
}

// 2. Companion screen on the client
public class MyMenuScreen extends MenuKitHandledScreen<MyMenuHandler> {
    public MyMenuScreen(MyMenuHandler handler, Inventory inventory, Component title) {
        super(handler, inventory, title);
    }
    // Override panel layout if needed; default plays nicely with MK regions.
}

// 3. Open from the server side
player.openMenu(new SimpleMenuProvider((syncId, inv, p) ->
    new MyMenuHandler(syncId, inv, accessor), Component.literal("My Menu")));

Feature highlights

  • Custom container menusMenuKitScreenHandler + MenuKitHandledScreen for clean integration with MK's panel system.
  • Per-slot stateMKSlotState attaches arbitrary state to individual slots; server-authoritative, auto-synced to the client (SlotStateBag, SlotStateClientCache).
  • Slot-group regions — group slots into named regions; anchor MK panels to those groups.
  • Storage primitivesStorage, KeyedStorage, PlayerStorage, EphemeralStorage, StorageAttachment cover most container patterns.
  • Custom payloadsSlotStateUpdateC2SPayload, SlotStateSnapshotS2CPayload, SlotStateUpdateS2CPayload for the slot-state protocol; pattern is reusable for your own typed payloads.
  • Contract verificationContractVerification validates slot/UI invariants at runtime.

License

MIT. See LICENSE.

Issues

File issues at github.com/trevorschoeny/menukit-containers/issues.

Available Versions

MenuKit: Containers 1.0.0release
MC 1.21.11fabric
May 16, 2026

How to Install MenuKit: Containers on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.11).

3

Install Mod

Open the mod browser in the dashboard and search for "MenuKit: Containers". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabric

Minecraft Versions

1.21.11

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

MenuKit: Containers server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.11). You can switch loaders with one click in the panel.

Is MenuKit: Containers compatible with fabric?

MenuKit: Containers officially supports fabric for Minecraft 1.21.11. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with MenuKit: Containers – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if MenuKit: Containers consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install MenuKit: Containers with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
MIT License
Server-side
Required

Supported Versions

1.21.11