Class ClientSlots

java.lang.Object
com.trevlar.slotkit.api.slot.ClientSlots

public final class ClientSlots extends Object
What the client can ask about a slot group while a screen is open. A mod's own panel reads it to follow the server: SlotKit keeps each group's shown state (a custom menu's panel flag, a hidden reveal), and the panel shows only what is live.
panel.visibleWhen(() -> ClientSlots.isShown(MY_GROUP.id()));
  • Method Details

    • isShown

      public static boolean isShown(SlotGroupId.Created group)
      Whether the open screen's menu carries group and at least one of its slots is live on this client (not inert). False off a container screen, on a menu without the group (a server without SlotKit, a menu an onto group isn't on), and while every slot of it is hidden.