Package net.minecraft.dialog
Record Class DialogButton
java.lang.Object
java.lang.Record
net.minecraft.dialog.DialogButton
- Record Components:
-onClick-
public record DialogButton(DialogButtonData buttonData, Optional<ClickEvent> onClick)
extends Record
- Mappings:
Namespace Name named net/minecraft/dialog/DialogButtonintermediary net/minecraft/class_11415official arpnamed buttonDataintermediary comp_4296official cnamed onClickintermediary comp_4297official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DialogButtonDataThe field for thebuttonDatarecord component.static final com.mojang.serialization.Codec<DialogButton> static final com.mojang.serialization.MapCodec<DialogButton> private final Optional<ClickEvent> The field for theonClickrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDialogButton(DialogButtonData dialogButtonData, Optional<ClickEvent> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuttonDatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.onClick()Returns the value of theonClickrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
buttonData
The field for thebuttonDatarecord component. -
onClick
The field for theonClickrecord component. -
MAP_CODEC
- Mappings:
Namespace Name Mixin selector named MAP_CODECLnet/minecraft/dialog/DialogButton;MAP_CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_60614Lnet/minecraft/class_11415;field_60614:Lcom/mojang/serialization/MapCodec;official aLarp;a:Lcom/mojang/serialization/MapCodec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/dialog/DialogButton;CODEC:Lcom/mojang/serialization/Codec;intermediary field_60615Lnet/minecraft/class_11415;field_60615:Lcom/mojang/serialization/Codec;official bLarp;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
DialogButton
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
buttonData
Returns the value of thebuttonDatarecord component.- Returns:
- the value of the
buttonDatarecord component
-
onClick
Returns the value of theonClickrecord component.- Returns:
- the value of the
onClickrecord component
-