Interface VanillaSlotIdentity
- All Known Implementing Classes:
MKCVanillaSlotIdentity
public interface VanillaSlotIdentity
Port (MK defines, MKC implements via §0050): the menu-INDEPENDENT identity of a
vanilla slot — its container's stable identity plus the container-relative
index. This is what lets a vanilla slot's
Address be the same whether
the slot is touched through its menu, by a hopper, or after a reopen (the same
reason created slots are menu-independent).
Why a port
The stable container identity comes from §0050's container resolution (PersistentContainerKey: pos+dim for block entities — side-
agnostic — or a UUID for player/entity containers), which lives in MKC; §0042
forbids MK referencing it. So MK defines this port and MKC fills it. With MKC
absent the NoServerTier null-object returns Optional.empty(),
and the address minter falls back to a menu-based identity (fine — vanilla-slot
gating only exists when MKC is present, so client-only decoration has nothing
to stay consistent with).-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionidentify(net.minecraft.world.Container container, int containerSlotIndex) The stable, menu-independent identity of the vanilla slot atcontainerSlotIndexincontainer, or empty when the container has no stable identity (MK alone, or an unresolvable container such as an ender chest / horse-family bag).
-
Method Details
-
identify
Optional<VanillaSlotIdentity.Resolved> identify(net.minecraft.world.Container container, int containerSlotIndex) The stable, menu-independent identity of the vanilla slot atcontainerSlotIndexincontainer, or empty when the container has no stable identity (MK alone, or an unresolvable container such as an ender chest / horse-family bag).
-