Record Class DialogListDialog
java.lang.Object
java.lang.Record
net.minecraft.server.dialog.DialogListDialog
- All Implemented Interfaces:
ButtonListDialog, Dialog
public record DialogListDialog(CommonDialogData common, HolderSet<Dialog> dialogs, Optional<ActionButton> exitAction, int columns, int buttonWidth)
extends Record
implements ButtonListDialog
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebuttonWidthrecord component.private final intThe field for thecolumnsrecord component.private final CommonDialogDataThe field for thecommonrecord component.The field for thedialogsrecord component.private final Optional<ActionButton> The field for theexitActionrecord component.static final com.mojang.serialization.MapCodec<DialogListDialog> Fields inherited from interface Dialog
CODEC, CONTEXT_FREE_STREAM_CODEC, DIRECT_CODEC, LIST_CODEC, STREAM_CODEC, WIDTH_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionDialogListDialog(CommonDialogData common, HolderSet<Dialog> dialogs, Optional<ActionButton> exitAction, int columns, int buttonWidth) Creates an instance of aDialogListDialogrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebuttonWidthrecord component.com.mojang.serialization.MapCodec<DialogListDialog> codec()intcolumns()Returns the value of thecolumnsrecord component.common()Returns the value of thecommonrecord component.dialogs()Returns the value of thedialogsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexitActionrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ButtonListDialog
onCancel
-
Field Details
-
common
The field for thecommonrecord component. -
dialogs
-
exitAction
The field for theexitActionrecord component. -
columns
private final int columnsThe field for thecolumnsrecord component. -
buttonWidth
private final int buttonWidthThe field for thebuttonWidthrecord component. -
MAP_CODEC
-
-
Constructor Details
-
DialogListDialog
public DialogListDialog(CommonDialogData common, HolderSet<Dialog> dialogs, Optional<ActionButton> exitAction, int columns, int buttonWidth) Creates an instance of aDialogListDialogrecord class.- Parameters:
common- the value for thecommonrecord componentdialogs- the value for thedialogsrecord componentexitAction- the value for theexitActionrecord componentcolumns- the value for thecolumnsrecord componentbuttonWidth- the value for thebuttonWidthrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceButtonListDialog- Specified by:
codecin interfaceDialog
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
common
Returns the value of thecommonrecord component. -
dialogs
-
exitAction
Returns the value of theexitActionrecord component.- Specified by:
exitActionin interfaceButtonListDialog- Returns:
- the value of the
exitActionrecord component
-
columns
public int columns()Returns the value of thecolumnsrecord component.- Specified by:
columnsin interfaceButtonListDialog- Returns:
- the value of the
columnsrecord component
-
buttonWidth
public int buttonWidth()Returns the value of thebuttonWidthrecord component.- Returns:
- the value of the
buttonWidthrecord component
-