Package net.minecraft.server.dialog
Record Class NoticeDialog
java.lang.Object
java.lang.Record
net.minecraft.server.dialog.NoticeDialog
- All Implemented Interfaces:
Dialog
,SimpleDialog
public record NoticeDialog(CommonDialogData common, ActionButton action)
extends Record
implements SimpleDialog
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ActionButton
The field for theaction
record component.private final CommonDialogData
The field for thecommon
record component.static final ActionButton
static final com.mojang.serialization.MapCodec
<NoticeDialog> Fields inherited from interface net.minecraft.server.dialog.Dialog
CODEC, CONTEXT_FREE_STREAM_CODEC, DIRECT_CODEC, LIST_CODEC, STREAM_CODEC, WIDTH_CODEC
-
Constructor Summary
ConstructorsConstructorDescriptionNoticeDialog
(CommonDialogData common, ActionButton action) Creates an instance of aNoticeDialog
record class. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Returns the value of theaction
record component.com.mojang.serialization.MapCodec
<NoticeDialog> codec()
common()
Returns the value of thecommon
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.onCancel()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
common
The field for thecommon
record component. -
action
The field for theaction
record component. -
DEFAULT_ACTION
-
MAP_CODEC
-
-
Constructor Details
-
NoticeDialog
Creates an instance of aNoticeDialog
record class.- Parameters:
common
- the value for thecommon
record componentaction
- the value for theaction
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceDialog
- Specified by:
codec
in interfaceSimpleDialog
-
onCancel
-
mainActions
- Specified by:
mainActions
in interfaceSimpleDialog
-
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)
. -
common
Returns the value of thecommon
record component. -
action
Returns the value of theaction
record component.- Returns:
- the value of the
action
record component
-