Package net.minecraft.server.dialog
Record Class ServerLinksDialog
java.lang.Object
java.lang.Record
net.minecraft.server.dialog.ServerLinksDialog
- All Implemented Interfaces:
ButtonListDialog,Dialog
public record ServerLinksDialog(CommonDialogData common, 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.private final Optional<ActionButton> The field for theexitActionrecord component.static final com.mojang.serialization.MapCodec<ServerLinksDialog> Fields inherited from interface net.minecraft.server.dialog.Dialog
CODEC, CONTEXT_FREE_STREAM_CODEC, DIRECT_CODEC, LIST_CODEC, STREAM_CODEC, WIDTH_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionServerLinksDialog(CommonDialogData common, Optional<ActionButton> exitAction, int columns, int buttonWidth) Creates an instance of aServerLinksDialogrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebuttonWidthrecord component.com.mojang.serialization.MapCodec<ServerLinksDialog> codec()intcolumns()Returns the value of thecolumnsrecord component.common()Returns the value of thecommonrecord 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.server.dialog.ButtonListDialog
onCancel
-
Field Details
-
common
The field for thecommonrecord component. -
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
-
ServerLinksDialog
public ServerLinksDialog(CommonDialogData common, Optional<ActionButton> exitAction, int columns, int buttonWidth) Creates an instance of aServerLinksDialogrecord class.- Parameters:
common- the value for thecommonrecord 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
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 thecommonrecord component. -
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
-