@Environment(value=CLIENT) class RecipeAlternativesWidget.AlternativeButtonWidget extends AbstractButtonWidget implements RecipeGridAligner<Ingredient>
Modifier and Type | Class and Description |
---|---|
class |
RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot |
Modifier and Type | Field and Description |
---|---|
private boolean |
craftable |
private Recipe<?> |
recipe |
protected List<RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot> |
slots |
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
AlternativeButtonWidget(int x,
int y,
Recipe<?> recipe,
boolean craftable) |
Modifier and Type | Method and 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) |
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
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
alignRecipeToGrid
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
private final Recipe<?> recipe
private final boolean craftable
protected final List<RecipeAlternativesWidget.AlternativeButtonWidget.InputSlot> slots
public AlternativeButtonWidget(int x, int y, Recipe<?> recipe, boolean craftable)
protected void alignRecipe(Recipe<?> recipe)
public void acceptAlignedInput(Iterator<Ingredient> inputs, int slot, int amount, int gridX, int gridY)
acceptAlignedInput
in interface RecipeGridAligner<Ingredient>
public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
renderButton
in class AbstractButtonWidget