Class RecipeButton
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.screens.recipebook.RecipeButton
- All Implemented Interfaces:
GuiEventListener, Renderable, TabOrderedElement, LayoutElement, NarratableEntry, NarrationSupplier
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractWidget
AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final floatprivate floatprivate static final intprivate RecipeCollectionprivate static final Componentprivate List<RecipeButton.ResolvedEntry> private static final Identifierprivate static final Identifierprivate static final Identifierprivate static final Identifierprivate final SlotSelectTimeFields inherited from class AbstractWidget
active, alpha, height, isHovered, message, packedFGColor, UNSET_FG_COLOR, visible, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleangetTooltipText(ItemStack displayStack) intgetWidth()private booleanvoidinit(RecipeCollection collection, boolean isFiltering, RecipeBookPage page, ContextMap resolutionContext) booleanprotected booleanisValidClickButton(MouseButtonInfo buttonInfo) voidrenderWidget(GuiGraphics graphics, int mouseX, int mouseY, float a) voidMethods inherited from class AbstractWidget
clearFGColor, createNarrationMessage, defaultButtonNarrationText, getAlpha, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, onRelease, playButtonClickSound, playDownSound, render, renderScrollingStringOverContents, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiEventListener
charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface LayoutElement
setPositionMethods inherited from interface NarratableEntry
getNarratables
-
Field Details
-
SLOT_MANY_CRAFTABLE_SPRITE
-
SLOT_CRAFTABLE_SPRITE
-
SLOT_MANY_UNCRAFTABLE_SPRITE
-
SLOT_UNCRAFTABLE_SPRITE
-
ANIMATION_TIME
private static final float ANIMATION_TIME- See Also:
-
BACKGROUND_SIZE
private static final int BACKGROUND_SIZE- See Also:
-
MORE_RECIPES_TOOLTIP
-
collection
-
selectedEntries
-
allRecipesHaveSameResultDisplay
private boolean allRecipesHaveSameResultDisplay -
slotSelectTime
-
animationTime
private float animationTime
-
-
Constructor Details
-
RecipeButton
-
-
Method Details
-
init
public void init(RecipeCollection collection, boolean isFiltering, RecipeBookPage page, ContextMap resolutionContext) -
allRecipesHaveSameResultDisplay
-
getCollection
-
renderWidget
- Specified by:
renderWidgetin classAbstractWidget
-
hasMultipleRecipes
private boolean hasMultipleRecipes() -
isOnlyOption
public boolean isOnlyOption() -
getCurrentRecipe
-
getDisplayStack
-
getTooltipText
-
updateWidgetNarration
- Specified by:
updateWidgetNarrationin classAbstractWidget
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceLayoutElement- Overrides:
getWidthin classAbstractWidget
-
isValidClickButton
- Overrides:
isValidClickButtonin classAbstractWidget
-