Package net.minecraft.client.gui.widget
Class CyclingButtonWidget<T>
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.AbstractPressableButtonWidget
net.minecraft.client.gui.widget.CyclingButtonWidget<T>
- All Implemented Interfaces:
Drawable
,Element
,OrderableTooltip
@Environment(CLIENT) public class CyclingButtonWidget<T> extends AbstractPressableButtonWidget implements OrderableTooltip
- Mappings:
Namespace Name official dsa
intermediary net/minecraft/class_5676
named net/minecraft/client/gui/widget/CyclingButtonWidget
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CyclingButtonWidget.Builder<T>
static interface
CyclingButtonWidget.class_5678<T>
static interface
CyclingButtonWidget.class_5679<T>
(package private) static interface
CyclingButtonWidget.class_5680<T>
-
Field Summary
Fields Modifier and Type Field Description private static List<Boolean>
BOOLEAN_VALUES
private Text
field_27963
private CyclingButtonWidget.class_5680<T>
field_27966
private Function<T,Text>
field_27967
private Function<CyclingButtonWidget<T>,MutableText>
field_27968
private CyclingButtonWidget.class_5678<T>
field_27969
private CyclingButtonWidget.class_5679<T>
field_27970
private boolean
field_27971
private static BooleanSupplier
HAS_ALT_DOWN
private int
index
private T
value
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 Modifier Constructor Description private
CyclingButtonWidget(int int2, int int3, int int4, int int5, Text text, Text text2, int index, T value, CyclingButtonWidget.class_5680<T> class_5680, Function<T,Text> function, Function<CyclingButtonWidget<T>,MutableText> function2, CyclingButtonWidget.class_5678<T> class_5678, CyclingButtonWidget.class_5679<T> class_5679, boolean bool)
-
Method Summary
Modifier and Type Method Description private void
cycle(int amount)
private MutableText
getGenericTextForValue(T value)
protected MutableText
getNarrationMessage()
List<OrderedText>
getOrderedTooltip()
T
getValue()
static <T> CyclingButtonWidget.Builder<T>
method_32606(Function<T,Text> function)
static CyclingButtonWidget.Builder<Boolean>
method_32607(Text text, Text text2)
private void
method_32609(T value)
MutableText
method_32611()
static CyclingButtonWidget.Builder<Boolean>
method_32613(boolean bool)
static CyclingButtonWidget.Builder<Boolean>
method_32614()
boolean
mouseScrolled(double mouseX, double mouseY, double amount)
Callback for when a mouse button scroll event has been captured.void
onPress()
void
setValue(T value)
Methods inherited from class net.minecraft.client.gui.widget.AbstractPressableButtonWidget
keyPressed, onClick
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, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderButton, 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, method_33284, 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, keyReleased, mouseMoved
-
Field Details
-
HAS_ALT_DOWN
- Mappings:
Namespace Name Mixin selector official a
Ldsa;a:Ljava/util/function/BooleanSupplier;
intermediary field_27961
Lnet/minecraft/class_5676;field_27961:Ljava/util/function/BooleanSupplier;
named HAS_ALT_DOWN
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;HAS_ALT_DOWN:Ljava/util/function/BooleanSupplier;
-
BOOLEAN_VALUES
- Mappings:
Namespace Name Mixin selector official b
Ldsa;b:Ljava/util/List;
intermediary field_27962
Lnet/minecraft/class_5676;field_27962:Ljava/util/List;
named BOOLEAN_VALUES
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;BOOLEAN_VALUES:Ljava/util/List;
-
field_27963
- Mappings:
Namespace Name Mixin selector official c
Ldsa;c:Loi;
intermediary field_27963
Lnet/minecraft/class_5676;field_27963:Lnet/minecraft/class_2561;
named field_27963
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27963:Lnet/minecraft/text/Text;
-
index
private int index- Mappings:
Namespace Name Mixin selector official d
Ldsa;d:I
intermediary field_27964
Lnet/minecraft/class_5676;field_27964:I
named index
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;index:I
-
value
- Mappings:
Namespace Name Mixin selector official e
Ldsa;e:Ljava/lang/Object;
intermediary field_27965
Lnet/minecraft/class_5676;field_27965:Ljava/lang/Object;
named value
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;value:Ljava/lang/Object;
-
field_27966
- Mappings:
Namespace Name Mixin selector official s
Ldsa;s:Ldsa$d;
intermediary field_27966
Lnet/minecraft/class_5676;field_27966:Lnet/minecraft/class_5676$class_5680;
named field_27966
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27966:Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5680;
-
field_27967
- Mappings:
Namespace Name Mixin selector official t
Ldsa;t:Ljava/util/function/Function;
intermediary field_27967
Lnet/minecraft/class_5676;field_27967:Ljava/util/function/Function;
named field_27967
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27967:Ljava/util/function/Function;
-
field_27968
- Mappings:
Namespace Name Mixin selector official u
Ldsa;u:Ljava/util/function/Function;
intermediary field_27968
Lnet/minecraft/class_5676;field_27968:Ljava/util/function/Function;
named field_27968
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27968:Ljava/util/function/Function;
-
field_27969
- Mappings:
Namespace Name Mixin selector official v
Ldsa;v:Ldsa$b;
intermediary field_27969
Lnet/minecraft/class_5676;field_27969:Lnet/minecraft/class_5676$class_5678;
named field_27969
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27969:Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5678;
-
field_27970
- Mappings:
Namespace Name Mixin selector official w
Ldsa;w:Ldsa$c;
intermediary field_27970
Lnet/minecraft/class_5676;field_27970:Lnet/minecraft/class_5676$class_5679;
named field_27970
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27970:Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5679;
-
field_27971
private final boolean field_27971- Mappings:
Namespace Name Mixin selector official x
Ldsa;x:Z
intermediary field_27971
Lnet/minecraft/class_5676;field_27971:Z
named field_27971
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;field_27971:Z
-
-
Constructor Details
-
CyclingButtonWidget
private CyclingButtonWidget(int int2, int int3, int int4, int int5, Text text, Text text2, int index, T value, CyclingButtonWidget.class_5680<T> class_5680, Function<T,Text> function, Function<CyclingButtonWidget<T>,MutableText> function2, CyclingButtonWidget.class_5678<T> class_5678, CyclingButtonWidget.class_5679<T> class_5679, boolean bool)- Mappings:
Namespace Name Mixin selector official <init>
Ldsa;<init>(IIIILoi;Loi;ILjava/lang/Object;Ldsa$d;Ljava/util/function/Function;Ljava/util/function/Function;Ldsa$b;Ldsa$c;Z)V
intermediary <init>
Lnet/minecraft/class_5676;<init>(IIIILnet/minecraft/class_2561;Lnet/minecraft/class_2561;ILjava/lang/Object;Lnet/minecraft/class_5676$class_5680;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/class_5676$class_5678;Lnet/minecraft/class_5676$class_5679;Z)V
named <init>
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;<init>(IIIILnet/minecraft/text/Text;Lnet/minecraft/text/Text;ILjava/lang/Object;Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5680;Ljava/util/function/Function;Ljava/util/function/Function;Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5678;Lnet/minecraft/client/gui/widget/CyclingButtonWidget$class_5679;Z)V
-
-
Method Details
-
onPress
public void onPress()- Specified by:
onPress
in classAbstractPressableButtonWidget
- Mappings:
Namespace Name Mixin selector official b
Ldro;b()V
intermediary method_25306
Lnet/minecraft/class_4264;method_25306()V
named onPress
Lnet/minecraft/client/gui/widget/AbstractPressableButtonWidget;onPress()V
-
cycle
private void cycle(int amount)- Mappings:
Namespace Name Mixin selector official e
Ldsa;e(I)V
intermediary method_32612
Lnet/minecraft/class_5676;method_32612(I)V
named cycle
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;cycle(I)V
-
mouseScrolled
public boolean mouseScrolled(double mouseX, double mouseY, double amount)Callback for when a mouse button scroll event has been captured.- Specified by:
mouseScrolled
in interfaceElement
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mouseamount
- value is> 1
if scrolled down,< 1
if scrolled up- Returns:
true
to indicate that the event handling is successful/valid- See Also:
Mouse.onMouseScroll(long, double, double)
- Mappings:
Namespace Name Mixin selector official a
Ldst;a(DDD)Z
intermediary method_25401
Lnet/minecraft/class_364;method_25401(DDD)Z
named mouseScrolled
Lnet/minecraft/client/gui/Element;mouseScrolled(DDD)Z
-
setValue
- Mappings:
Namespace Name Mixin selector official a
Ldsa;a(Ljava/lang/Object;)V
intermediary method_32605
Lnet/minecraft/class_5676;method_32605(Ljava/lang/Object;)V
named setValue
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;setValue(Ljava/lang/Object;)V
-
method_32609
- Mappings:
Namespace Name Mixin selector official b
Ldsa;b(Ljava/lang/Object;)V
intermediary method_32609
Lnet/minecraft/class_5676;method_32609(Ljava/lang/Object;)V
named method_32609
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32609(Ljava/lang/Object;)V
-
getGenericTextForValue
- Mappings:
Namespace Name Mixin selector official c
Ldsa;c(Ljava/lang/Object;)Loo;
intermediary method_32610
Lnet/minecraft/class_5676;method_32610(Ljava/lang/Object;)Lnet/minecraft/class_5250;
named getGenericTextForValue
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;getGenericTextForValue(Ljava/lang/Object;)Lnet/minecraft/text/MutableText;
-
getValue
- Mappings:
Namespace Name Mixin selector official a
Ldsa;a()Ljava/lang/Object;
intermediary method_32603
Lnet/minecraft/class_5676;method_32603()Ljava/lang/Object;
named getValue
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;getValue()Ljava/lang/Object;
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official c
Ldrs;c()Loo;
intermediary method_25360
Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;
named getNarrationMessage
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
method_32611
- Mappings:
Namespace Name Mixin selector official d
Ldsa;d()Loo;
intermediary method_32611
Lnet/minecraft/class_5676;method_32611()Lnet/minecraft/class_5250;
named method_32611
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32611()Lnet/minecraft/text/MutableText;
-
getOrderedTooltip
- Specified by:
getOrderedTooltip
in interfaceOrderableTooltip
- Mappings:
Namespace Name Mixin selector official k
Ldso;k()Ljava/util/List;
intermediary method_31047
Lnet/minecraft/class_5499;method_31047()Ljava/util/List;
named getOrderedTooltip
Lnet/minecraft/client/util/OrderableTooltip;getOrderedTooltip()Ljava/util/List;
-
method_32606
- Mappings:
Namespace Name Mixin selector official a
Ldsa;a(Ljava/util/function/Function;)Ldsa$a;
intermediary method_32606
Lnet/minecraft/class_5676;method_32606(Ljava/util/function/Function;)Lnet/minecraft/class_5676$class_5677;
named method_32606
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32606(Ljava/util/function/Function;)Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Builder;
-
method_32607
- Mappings:
Namespace Name Mixin selector official a
Ldsa;a(Loi;Loi;)Ldsa$a;
intermediary method_32607
Lnet/minecraft/class_5676;method_32607(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_5676$class_5677;
named method_32607
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32607(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;)Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Builder;
-
method_32614
- Mappings:
Namespace Name Mixin selector official l
Ldsa;l()Ldsa$a;
intermediary method_32614
Lnet/minecraft/class_5676;method_32614()Lnet/minecraft/class_5676$class_5677;
named method_32614
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32614()Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Builder;
-
method_32613
- Mappings:
Namespace Name Mixin selector official e
Ldsa;e(Z)Ldsa$a;
intermediary method_32613
Lnet/minecraft/class_5676;method_32613(Z)Lnet/minecraft/class_5676$class_5677;
named method_32613
Lnet/minecraft/client/gui/widget/CyclingButtonWidget;method_32613(Z)Lnet/minecraft/client/gui/widget/CyclingButtonWidget$Builder;
-