Class LytSlotGrid

All Implemented Interfaces:
LytBlockContainer, LytErrorSink, Styleable

public class LytSlotGrid extends LytBox
  • Constructor Details

    • LytSlotGrid

      public LytSlotGrid(int width, int height)
  • Method Details

    • columnFromStacks

      public static LytSlotGrid columnFromStacks(List<net.minecraft.world.item.ItemStack> items, boolean skipEmpty)
    • rowFromStacks

      public static LytSlotGrid rowFromStacks(List<net.minecraft.world.item.ItemStack> items, boolean skipEmpty)
    • columnFromIngredients

      public static LytSlotGrid columnFromIngredients(List<@Nullable net.minecraft.world.item.crafting.Ingredient> ingredients, boolean skipEmpty)
    • rowFromIngredients

      public static LytSlotGrid rowFromIngredients(List<@Nullable net.minecraft.world.item.crafting.Ingredient> ingredients, boolean skipEmpty)
    • columnFromDisplays

      public static LytSlotGrid columnFromDisplays(List<? extends net.minecraft.world.item.crafting.display.SlotDisplay> displays, boolean skipEmpty)
    • rowFromDisplays

      public static LytSlotGrid rowFromDisplays(List<? extends net.minecraft.world.item.crafting.display.SlotDisplay> displays, boolean skipEmpty)
    • isRenderEmptySlots

      public boolean isRenderEmptySlots()
    • setRenderEmptySlots

      public void setRenderEmptySlots(boolean renderEmptySlots)
    • computeBoxLayout

      protected LytRect computeBoxLayout(LayoutContext context, int x, int y, int availableWidth)
      Specified by:
      computeBoxLayout in class LytBox
    • setItem

      public void setItem(int x, int y, net.minecraft.world.item.ItemStack item)
    • setIngredient

      public void setIngredient(int x, int y, net.minecraft.world.item.crafting.Ingredient ingredient)
    • setIngredient

      public void setIngredient(int x, int y, Optional<net.minecraft.world.item.crafting.Ingredient> ingredient)
    • setDisplay

      public void setDisplay(int x, int y, net.minecraft.world.item.crafting.display.SlotDisplay display)
    • render

      public void render(RenderContext context)
      Overrides:
      render in class LytBox