Package guideme.document.block
Class LytSlotGrid
java.lang.Object
guideme.document.block.LytNode
guideme.document.block.LytBlock
guideme.document.block.LytBox
guideme.document.block.LytSlotGrid
- All Implemented Interfaces:
LytBlockContainer
,LytErrorSink
,Styleable
-
Field Summary
Fields inherited from class guideme.document.block.LytBox
children, paddingBottom, paddingLeft, paddingRight, paddingTop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LytSlotGrid
columnFromDisplays
(List<? extends net.minecraft.world.item.crafting.display.SlotDisplay> displays, boolean skipEmpty) static LytSlotGrid
columnFromIngredients
(List<@Nullable net.minecraft.world.item.crafting.Ingredient> ingredients, boolean skipEmpty) static LytSlotGrid
columnFromStacks
(List<net.minecraft.world.item.ItemStack> items, boolean skipEmpty) protected LytRect
computeBoxLayout
(LayoutContext context, int x, int y, int availableWidth) boolean
void
render
(RenderContext context) static LytSlotGrid
rowFromDisplays
(List<? extends net.minecraft.world.item.crafting.display.SlotDisplay> displays, boolean skipEmpty) static LytSlotGrid
rowFromIngredients
(List<@Nullable net.minecraft.world.item.crafting.Ingredient> ingredients, boolean skipEmpty) static LytSlotGrid
rowFromStacks
(List<net.minecraft.world.item.ItemStack> items, boolean skipEmpty) void
setDisplay
(int x, int y, net.minecraft.world.item.crafting.display.SlotDisplay display) void
setIngredient
(int x, int y, Optional<net.minecraft.world.item.crafting.Ingredient> ingredient) void
setIngredient
(int x, int y, net.minecraft.world.item.crafting.Ingredient ingredient) void
setItem
(int x, int y, net.minecraft.world.item.ItemStack item) void
setRenderEmptySlots
(boolean renderEmptySlots) Methods inherited from class guideme.document.block.LytBox
append, clearContent, computeLayout, getBackgroundColor, getChildren, onLayoutMoved, removeChild, renderBatch, setBackgroundColor, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop
Methods inherited from class guideme.document.block.LytBlock
getBorderBottom, getBorderLeft, getBorderRight, getBorderTop, getBounds, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, isCulled, isFullWidth, layout, setBorder, setBorderBottom, setBorderLeft, setBorderRight, setBorderTop, setFullWidth, setLayoutPos, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop
Methods inherited from class guideme.document.block.LytNode
getDocument, getHoverStyle, getParent, getSourceNode, getStyle, getStylingParent, getTextContent, onMouseEnter, onMouseLeave, pickNode, setHoverStyle, setSourceNode, setStyle, tick, visit, visit, visitChildren
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface guideme.document.block.LytBlockContainer
appendError
Methods inherited from interface guideme.style.Styleable
modifyHoverStyle, modifyStyle, resolveHoverStyle, resolveStyle
-
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
- Specified by:
computeBoxLayout
in classLytBox
-
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
-