Package net.minecraft.server.dialog
Record Class MultiActionDialog
java.lang.Object
java.lang.Record
net.minecraft.server.dialog.MultiActionDialog
- All Implemented Interfaces:
ButtonListDialog
,Dialog
public record MultiActionDialog(CommonDialogData common, List<ActionButton> actions, Optional<ActionButton> exitAction, int columns)
extends Record
implements ButtonListDialog
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<ActionButton> The field for theactions
record component.private final int
The field for thecolumns
record component.private final CommonDialogData
The field for thecommon
record component.private final Optional
<ActionButton> The field for theexitAction
record component.static final com.mojang.serialization.MapCodec
<MultiActionDialog> Fields inherited from interface net.minecraft.server.dialog.Dialog
CODEC, CONTEXT_FREE_STREAM_CODEC, DIRECT_CODEC, LIST_CODEC, STREAM_CODEC, WIDTH_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionMultiActionDialog
(CommonDialogData common, List<ActionButton> actions, Optional<ActionButton> exitAction, int columns) Creates an instance of aMultiActionDialog
record class. -
Method Summary
Modifier and TypeMethodDescriptionactions()
Returns the value of theactions
record component.com.mojang.serialization.MapCodec
<MultiActionDialog> codec()
int
columns()
Returns the value of thecolumns
record component.common()
Returns the value of thecommon
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexitAction
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.server.dialog.ButtonListDialog
onCancel
-
Field Details
-
common
The field for thecommon
record component. -
actions
The field for theactions
record component. -
exitAction
The field for theexitAction
record component. -
columns
private final int columnsThe field for thecolumns
record component. -
MAP_CODEC
-
-
Constructor Details
-
MultiActionDialog
public MultiActionDialog(CommonDialogData common, List<ActionButton> actions, Optional<ActionButton> exitAction, int columns) Creates an instance of aMultiActionDialog
record class.- Parameters:
common
- the value for thecommon
record componentactions
- the value for theactions
record componentexitAction
- the value for theexitAction
record componentcolumns
- the value for thecolumns
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceButtonListDialog
- Specified by:
codec
in interfaceDialog
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
common
Returns the value of thecommon
record component. -
actions
Returns the value of theactions
record component.- Returns:
- the value of the
actions
record component
-
exitAction
Returns the value of theexitAction
record component.- Specified by:
exitAction
in interfaceButtonListDialog
- Returns:
- the value of the
exitAction
record component
-
columns
public int columns()Returns the value of thecolumns
record component.- Specified by:
columns
in interfaceButtonListDialog
- Returns:
- the value of the
columns
record component
-