Record Class CommonDialogData
java.lang.Object
java.lang.Record
net.minecraft.server.dialog.CommonDialogData
public record CommonDialogData(Component title, Optional<Component> externalTitle, boolean canCloseWithEscape, boolean pause, DialogAction afterAction, List<DialogBody> body, List<Input> inputs)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DialogActionThe field for theafterActionrecord component.private final List<DialogBody> The field for thebodyrecord component.private final booleanThe field for thecanCloseWithEscaperecord component.The field for theexternalTitlerecord component.The field for theinputsrecord component.static final com.mojang.serialization.MapCodec<CommonDialogData> private final booleanThe field for thepauserecord component.private final ComponentThe field for thetitlerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCommonDialogData(Component title, Optional<Component> externalTitle, boolean canCloseWithEscape, boolean pause, DialogAction afterAction, List<DialogBody> body, List<Input> inputs) Creates an instance of aCommonDialogDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theafterActionrecord component.body()Returns the value of thebodyrecord component.booleanReturns the value of thecanCloseWithEscaperecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexternalTitlerecord component.final inthashCode()Returns a hash code value for this object.inputs()Returns the value of theinputsrecord component.booleanpause()Returns the value of thepauserecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
title
The field for thetitlerecord component. -
externalTitle
-
canCloseWithEscape
private final boolean canCloseWithEscapeThe field for thecanCloseWithEscaperecord component. -
pause
private final boolean pauseThe field for thepauserecord component. -
afterAction
The field for theafterActionrecord component. -
body
The field for thebodyrecord component. -
inputs
-
MAP_CODEC
-
-
Constructor Details
-
CommonDialogData
public CommonDialogData(Component title, Optional<Component> externalTitle, boolean canCloseWithEscape, boolean pause, DialogAction afterAction, List<DialogBody> body, List<Input> inputs) Creates an instance of aCommonDialogDatarecord class.- Parameters:
title- the value for thetitlerecord componentexternalTitle- the value for theexternalTitlerecord componentcanCloseWithEscape- the value for thecanCloseWithEscaperecord componentpause- the value for thepauserecord componentafterAction- the value for theafterActionrecord componentbody- the value for thebodyrecord componentinputs- the value for theinputsrecord component
-
-
Method Details
-
computeExternalTitle
-
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. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
externalTitle
-
canCloseWithEscape
public boolean canCloseWithEscape()Returns the value of thecanCloseWithEscaperecord component.- Returns:
- the value of the
canCloseWithEscaperecord component
-
pause
public boolean pause()Returns the value of thepauserecord component.- Returns:
- the value of the
pauserecord component
-
afterAction
Returns the value of theafterActionrecord component.- Returns:
- the value of the
afterActionrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
inputs
-