Class LytSlot

All Implemented Interfaces:
InteractiveElement, Styleable

public class LytSlot extends LytBlock implements InteractiveElement
Renders a standard Minecraft GUI slot.
  • Field Details

  • Constructor Details

    • LytSlot

      public LytSlot(net.minecraft.world.item.crafting.display.SlotDisplay display)
    • LytSlot

      public LytSlot(net.minecraft.world.item.crafting.Ingredient ingredient)
    • LytSlot

      public LytSlot(Optional<net.minecraft.world.item.crafting.Ingredient> ingredient)
    • LytSlot

      public LytSlot(net.minecraft.world.item.ItemStack stack)
  • Method Details

    • isLargeSlot

      public boolean isLargeSlot()
    • setLargeSlot

      public void setLargeSlot(boolean largeSlot)
    • isSlotVisible

      public boolean isSlotVisible()
    • setSlotVisible

      public void setSlotVisible(boolean visibleSlot)
    • computeLayout

      protected LytRect computeLayout(LayoutContext context, int x, int y, int availableWidth)
      Specified by:
      computeLayout in class LytBlock
    • onLayoutMoved

      protected void onLayoutMoved(int deltaX, int deltaY)
      Description copied from class: LytBlock
      Implement to react to layout previously computed by LytBlock.computeLayout(LayoutContext, int, int, int) being moved.
      Specified by:
      onLayoutMoved in class LytBlock
    • render

      public void render(RenderContext context)
      Specified by:
      render in class LytBlock
    • getTooltip

      public Optional<GuideTooltip> getTooltip(float x, float y)
      Specified by:
      getTooltip in interface InteractiveElement
      Parameters:
      x - X position of the mouse in document coordinates.
      y - Y position of the mouse in document coordinates.