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 class
RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot
-
Field Summary
Fields Modifier and Type Field Description private boolean
craftable
private Recipe<?>
recipe
protected List<RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot>
slots
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 AlternativeButtonWidget(int x, int y, Recipe<?> recipe, boolean craftable)
-
Method Summary
Modifier and Type Method Description void
acceptAlignedInput(Iterator<Ingredient> inputs, int slot, int amount, int gridX, int gridY)
protected void
alignRecipe(Recipe<?> recipe)
void
renderButton(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, 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
Methods 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:
acceptAlignedInput
in interfaceRecipeGridAligner<Ingredient>
-
renderButton
- Overrides:
renderButton
in classAbstractButtonWidget
-