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 Identifier
BACKGROUND_TEXTURE
private float
bounce
private AbstractRecipeScreenHandler<?>
craftingScreenHandler
private int
currentResultIndex
private static Text
field_26595
private RecipeBook
recipeBook
private RecipeResultCollection
results
private float
time
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields 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()
RecipeResultCollection
getResultCollection()
private List<Recipe<?>>
getResults()
List<Text>
getTooltip(Screen screen)
int
getWidth()
boolean
hasResults()
protected boolean
isValidClickButton(int button)
void
renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
void
setPos(int x, int y)
void
showResultCollection(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, setWidth
Methods 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, setZOffset
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.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:
renderButton
in classAbstractButtonWidget
-
getResults
-
hasResults
public boolean hasResults() -
currentRecipe
-
getTooltip
-
getWidth
public int getWidth()- Overrides:
getWidth
in classAbstractButtonWidget
-
isValidClickButton
protected boolean isValidClickButton(int button)- Overrides:
isValidClickButton
in classAbstractButtonWidget
-