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 classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final float
private float
private static final int
private RecipeBook
private RecipeCollection
private int
private RecipeBookMenu<?>
private static final Component
private static final ResourceLocation
static final int
private float
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRecipe<?>
int
getWidth()
void
init
(RecipeCollection p_100480_, RecipeBookPage p_100481_) boolean
protected boolean
isValidClickButton
(int p_100473_) void
renderWidget
(GuiGraphics p_281385_, int p_282779_, int p_282744_, float p_282439_) void
updateWidgetNarration
(NarrationElementOutput p_170060_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderTexture, setAlpha, setFGColor, setFocused, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyPressed, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
RECIPE_BOOK_LOCATION
-
ANIMATION_TIME
private static final float ANIMATION_TIME- See Also:
-
BACKGROUND_SIZE
private static final int BACKGROUND_SIZE- See Also:
-
TICKS_TO_SWAP
public static final int TICKS_TO_SWAP- See Also:
-
MORE_RECIPES_TOOLTIP
-
book
-
collection
-
time
private float time -
animationTime
private float animationTime -
currentIndex
private int currentIndex
-
-
Constructor Details
-
RecipeButton
public RecipeButton()
-
-
Method Details
-
init
-
getCollection
-
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
getOrderedRecipes
-
isOnlyOption
public boolean isOnlyOption() -
getRecipe
-
getTooltipText
-
updateWidgetNarration
- Specified by:
updateWidgetNarration
in classAbstractWidget
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceLayoutElement
- Overrides:
getWidth
in classAbstractWidget
-
isValidClickButton
protected boolean isValidClickButton(int p_100473_) - Overrides:
isValidClickButton
in classAbstractWidget
-