Class RecipeButton
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.screens.recipebook.RecipeButton
- All Implemented Interfaces:
GuiEventListener,Widget,NarratableEntry,NarrationSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static floatprivate floatprivate static intprivate RecipeBookprivate RecipeCollectionprivate intprivate RecipeBookMenu<?>private static Componentprivate static ResourceLocationstatic intprivate floatFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRecipe<?>getTooltipText(Screen p_100478_)intgetWidth()voidinit(RecipeCollection p_100480_, RecipeBookPage p_100481_)booleanprotected booleanisValidClickButton(int p_100473_)voidrenderButton(PoseStack p_100484_, int p_100485_, int p_100486_, float p_100487_)voidsetPosition(int p_100475_, int p_100476_)voidupdateNarration(NarrationElementOutput p_170060_)Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getYImage, isActive, isFocused, isHovered, isMouseOver, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessageMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
RECIPE_BOOK_LOCATION
-
ANIMATION_TIME
private static final float ANIMATION_TIME- See Also:
- Constant Field Values
-
BACKGROUND_SIZE
private static final int BACKGROUND_SIZE- See Also:
- Constant Field Values
-
TICKS_TO_SWAP
public static final int TICKS_TO_SWAP- See Also:
- Constant Field Values
-
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
-
setPosition
public void setPosition(int p_100475_, int p_100476_) -
renderButton
- Overrides:
renderButtonin classAbstractWidget
-
getOrderedRecipes
-
isOnlyOption
public boolean isOnlyOption() -
getRecipe
-
getTooltipText
-
updateNarration
-
getWidth
public int getWidth()- Overrides:
getWidthin classAbstractWidget
-
isValidClickButton
protected boolean isValidClickButton(int p_100473_)- Overrides:
isValidClickButtonin classAbstractWidget
-