Class RecipeWidget
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.widget.Widget
-
- net.minecraft.client.gui.recipebook.RecipeWidget
-
- All Implemented Interfaces:
IGuiEventListener,IRenderable
public class RecipeWidget extends Widget
-
-
Field Summary
Fields Modifier and Type Field Description private floatanimationTimeprivate RecipeBookbookprivate RecipeListcollectionprivate intcurrentIndexprivate RecipeBookContainer<?>menuprivate static ITextComponentMORE_RECIPES_TOOLTIPprivate static ResourceLocationRECIPE_BOOK_LOCATIONprivate floattime-
Fields inherited from class net.minecraft.client.gui.widget.Widget
active, alpha, height, isHovered, nextNarration, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description RecipeWidget()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecipeListgetCollection()private java.util.List<IRecipe<?>>getOrderedRecipes()IRecipe<?>getRecipe()java.util.List<ITextComponent>getTooltipText(Screen p_191772_1_)intgetWidth()voidinit(RecipeList p_203400_1_, RecipeBookPage p_203400_2_)booleanisOnlyOption()protected booleanisValidClickButton(int p_230987_1_)voidrenderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)voidsetPosition(int p_191770_1_, int p_191770_2_)-
Methods inherited from class net.minecraft.client.gui.widget.Widget
changeFocus, clearFGColor, clicked, createNarrationMessage, getFGColor, getHeight, getMessage, getYImage, isFocused, isHovered, isMouseOver, mouseClicked, mouseDragged, mouseReleased, narrate, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
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.IGuiEventListener
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
-
-
-
-
Field Detail
-
RECIPE_BOOK_LOCATION
private static final ResourceLocation RECIPE_BOOK_LOCATION
-
MORE_RECIPES_TOOLTIP
private static final ITextComponent MORE_RECIPES_TOOLTIP
-
menu
private RecipeBookContainer<?> menu
-
book
private RecipeBook book
-
collection
private RecipeList collection
-
time
private float time
-
animationTime
private float animationTime
-
currentIndex
private int currentIndex
-
-
Method Detail
-
init
public void init(RecipeList p_203400_1_, RecipeBookPage p_203400_2_)
-
getCollection
public RecipeList getCollection()
-
setPosition
public void setPosition(int p_191770_1_, int p_191770_2_)
-
renderButton
public void renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)
- Overrides:
renderButtonin classWidget
-
getOrderedRecipes
private java.util.List<IRecipe<?>> getOrderedRecipes()
-
isOnlyOption
public boolean isOnlyOption()
-
getRecipe
public IRecipe<?> getRecipe()
-
getTooltipText
public java.util.List<ITextComponent> getTooltipText(Screen p_191772_1_)
-
isValidClickButton
protected boolean isValidClickButton(int p_230987_1_)
- Overrides:
isValidClickButtonin classWidget
-
-