Class SlotAddresses
java.lang.Object
com.trevlar.menukit.core.SlotAddresses
The one MKC-side entry that mints the
Address of any live slot,
kind-dispatched — the server/enforcement counterpart of the client resolver.
THE ONE WINDOW's keystone is "one address scheme for every slot, vanilla or
created"; this is where the two enter through it:
- Created slot (an
MKCSlot, or the creative wrapper around one) → its menu-independent created address (CreatedSlotAdapter.addressOf(MKCSlot)). MKC ownsMKCSlot, so the detection is a direct type check — no port (the §0042 port is only needed where MK must reach an MKC type). - Vanilla slot →
VanillaAddressing.addressOf(AbstractContainerMenu, Slot)(container identity when §0050-resolvable, else the menu-based fallback).
WindowGating) and a created slot's own
behavioral overrides (MKCSlot) resolve through the same
encoding, so a behavior set on a slot's address is found no matter which path
reaches it. Server-safe: MKCSlotAccess.asMKCSlot(Slot) rides Slots.target,
whose creative-wrapper unwrap is simply absent server-side.-
Method Summary
-
Method Details
-
of
@Internal public static Address of(net.minecraft.world.inventory.AbstractContainerMenu menu, net.minecraft.world.inventory.Slot slot) TheAddressofslotas it sits inmenu, kind-dispatched.Internal minter. Live-
Slot→Addressmapping is the MKC enforcement/addressing-port plumbing (installed intoClientSlotAddressing+ called byWindowGating). Consumers hold the created-slot address minted by identity (CreatedSlotAdapter.addressOf(MKCSlot)), not raw slots.
-