Class AllCandidateUIDesigner.Baked
-
- All Implemented Interfaces:
public final class AllCandidateUIDesigner.BakedAn immutable snapshot of a resolved AllCandidateUIDesigner with all values fixed at bake time.
Obtained by calling bake or bakeWithEmptyContext. If any value fails isValid, the system falls back to a Baked built entirely from the DEFAULT designer.
- Since:
5.2.0
-
-
Field Summary
Fields Modifier and Type Field Description private final Componenttitleprivate final Set<CoordinateComponent>recipeSlotsprivate final Pair<CoordinateComponent, ItemStack>previousPageButtonprivate final Pair<CoordinateComponent, ItemStack>nextPageButtonprivate final Pair<CoordinateComponent, ItemStack>backToCraftUIButtonprivate final ItemStacknoDisplayableItemprivate final Function<CRecipe, ItemStack>ungeneratedIconPlaceholderItemprivate final Set<Integer>recipeSlotsIndex
-
Constructor Summary
Constructors Constructor Description AllCandidateUIDesigner.Baked(Component title, Set<CoordinateComponent> recipeSlots, Pair<CoordinateComponent, ItemStack> previousPageButton, Pair<CoordinateComponent, ItemStack> nextPageButton, Pair<CoordinateComponent, ItemStack> backToCraftUIButton, ItemStack noDisplayableItem, Function<CRecipe, ItemStack> ungeneratedIconPlaceholderItem)
-
Method Summary
Modifier and Type Method Description final ComponentgetTitle()final Set<CoordinateComponent>getRecipeSlots()final Pair<CoordinateComponent, ItemStack>getPreviousPageButton()final Pair<CoordinateComponent, ItemStack>getNextPageButton()final Pair<CoordinateComponent, ItemStack>getBackToCraftUIButton()final ItemStackgetNoDisplayableItem()final Function<CRecipe, ItemStack>getUngeneratedIconPlaceholderItem()final Set<Integer>getRecipeSlotsIndex()final UnitisValid()Validates this Baked instance. final ItemStackungeneratedIcon(CRecipe recipe)Returns the placeholder icon displayed for recipe until its result item has been generated. -
-
Constructor Detail
-
AllCandidateUIDesigner.Baked
AllCandidateUIDesigner.Baked(Component title, Set<CoordinateComponent> recipeSlots, Pair<CoordinateComponent, ItemStack> previousPageButton, Pair<CoordinateComponent, ItemStack> nextPageButton, Pair<CoordinateComponent, ItemStack> backToCraftUIButton, ItemStack noDisplayableItem, Function<CRecipe, ItemStack> ungeneratedIconPlaceholderItem)
-
-
Method Detail
-
getTitle
final Component getTitle()
-
getRecipeSlots
final Set<CoordinateComponent> getRecipeSlots()
-
getPreviousPageButton
final Pair<CoordinateComponent, ItemStack> getPreviousPageButton()
-
getNextPageButton
final Pair<CoordinateComponent, ItemStack> getNextPageButton()
-
getBackToCraftUIButton
final Pair<CoordinateComponent, ItemStack> getBackToCraftUIButton()
-
getNoDisplayableItem
final ItemStack getNoDisplayableItem()
-
getUngeneratedIconPlaceholderItem
final Function<CRecipe, ItemStack> getUngeneratedIconPlaceholderItem()
-
getRecipeSlotsIndex
final Set<Integer> getRecipeSlotsIndex()
-
isValid
final Unit isValid()
Validates this Baked instance.
Throws an IllegalStateException describing the first violation found if any value is inconsistent or out of the valid range.
- Since:
5.2.0
-
ungeneratedIcon
final ItemStack ungeneratedIcon(CRecipe recipe)
Returns the placeholder icon displayed for recipe until its result item has been generated.
If the item produced by ungeneratedIconPlaceholderItem is not displayable (empty, zero amount, or non-item material), the default placeholder from BAKED_DEFAULT is used instead.
- Parameters:
recipe- The recipe whose result item has not yet been generated- Returns:
ItemStack placeholder icon item to display in the UI slot
- Since:
5.2.0
-
-
-
-