Class RecipeAlternativesWidget.AlternativeButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.screen.recipebook.RecipeAlternativesWidget.AlternativeButtonWidget
- All Implemented Interfaces:
Drawable,Element,RecipeGridAligner<Ingredient>
- Direct Known Subclasses:
RecipeAlternativesWidget.FurnaceAlternativeButtonWidget
- Enclosing class:
- RecipeAlternativesWidget
@Environment(CLIENT) class RecipeAlternativesWidget.AlternativeButtonWidget extends AbstractButtonWidget implements RecipeGridAligner<Ingredient>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classRecipeAlternativesWidget.AlternativeButtonWidget.InputSlot -
Field Summary
Fields Modifier and Type Field Description private booleancraftableprivate Recipe<?>recipeprotected List<RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot>slotsFields 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 AlternativeButtonWidget(int x, int y, Recipe<?> recipe, boolean craftable) -
Method Summary
Modifier and Type Method Description voidacceptAlignedInput(Iterator<Ingredient> inputs, int slot, int amount, int gridX, int gridY)protected voidalignRecipe(Recipe<?> recipe)voidrenderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, method_32602, 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, method_33284, 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, mouseScrolledMethods inherited from interface net.minecraft.recipe.RecipeGridAligner
alignRecipeToGrid
-
Field Details
-
recipe
-
craftable
private final boolean craftable -
slots
-
-
Constructor Details
-
AlternativeButtonWidget
-
-
Method Details
-
alignRecipe
-
acceptAlignedInput
public void acceptAlignedInput(Iterator<Ingredient> inputs, int slot, int amount, int gridX, int gridY)- Specified by:
acceptAlignedInputin interfaceRecipeGridAligner<Ingredient>
-
renderButton
- Overrides:
renderButtonin classAbstractButtonWidget
-