Class AnimatedResultButton
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.screen.recipebook.AnimatedResultButton
@Environment(CLIENT) public class AnimatedResultButton extends AbstractButtonWidget
-
Field Summary
Fields Modifier and Type Field Description private static IdentifierBACKGROUND_TEXTUREprivate floatbounceprivate AbstractRecipeScreenHandler<?>craftingScreenHandlerprivate intcurrentResultIndexprivate static Textfield_26595private RecipeBookrecipeBookprivate RecipeResultCollectionresultsprivate floattimeFields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description AnimatedResultButton() -
Method Summary
Modifier and Type Method Description Recipe<?>currentRecipe()RecipeResultCollectiongetResultCollection()private List<Recipe<?>>getResults()List<Text>getTooltip(Screen screen)intgetWidth()booleanhasResults()protected booleanisValidClickButton(int button)voidrenderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)voidsetPos(int x, int y)voidshowResultCollection(RecipeResultCollection recipeResultCollection, RecipeBookResults recipeBookResults)Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getYImage, isFocused, isHovered, isMouseOver, mouseClicked, mouseDragged, mouseReleased, narrate, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
BACKGROUND_TEXTURE
-
field_26595
-
craftingScreenHandler
-
recipeBook
-
results
-
time
private float time -
bounce
private float bounce -
currentResultIndex
private int currentResultIndex
-
-
Constructor Details
-
AnimatedResultButton
public AnimatedResultButton()
-
-
Method Details
-
showResultCollection
public void showResultCollection(RecipeResultCollection recipeResultCollection, RecipeBookResults recipeBookResults) -
getResultCollection
-
setPos
public void setPos(int x, int y) -
renderButton
- Overrides:
renderButtonin classAbstractButtonWidget
-
getResults
-
hasResults
public boolean hasResults() -
currentRecipe
-
getTooltip
-
getWidth
public int getWidth()- Overrides:
getWidthin classAbstractButtonWidget
-
isValidClickButton
protected boolean isValidClickButton(int button)- Overrides:
isValidClickButtonin classAbstractButtonWidget
-