Class ContainerScreenEvent.SlotDrawn

java.lang.Object
dev.myriadclient.api.event.events.ContainerScreenEvent
dev.myriadclient.api.event.events.ContainerScreenEvent.SlotDrawn
Enclosing class:
ContainerScreenEvent

public static final class ContainerScreenEvent.SlotDrawn extends ContainerScreenEvent
A slot has been drawn, every frame, for each slot; draw over it with graphics() (Myriad.ui().draw(graphics, canvas -> ...) for the canvas). Coordinates are relative to the screen's container area, as the slot's x and y are. Not cancellable.
  • Constructor Details

    • SlotDrawn

      @Internal public SlotDrawn(net.minecraft.client.gui.screens.inventory.AbstractContainerScreen<?> screen, net.minecraft.world.inventory.Slot slot, net.minecraft.client.gui.GuiGraphicsExtractor graphics)
      Core's; only Myriad makes these.
  • Method Details

    • slot

      public net.minecraft.world.inventory.Slot slot()
      The slot just drawn.
    • graphics

      public net.minecraft.client.gui.GuiGraphicsExtractor graphics()
      Vanilla's drawing context, translated to the container area.