记录类 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
-
字段概要
字段修饰符和类型字段说明private final DialogAction
afterAction
记录组件的字段。private final List
<DialogBody> body
记录组件的字段。private final boolean
canCloseWithEscape
记录组件的字段。externalTitle
记录组件的字段。inputs
记录组件的字段。static final com.mojang.serialization.MapCodec
<CommonDialogData> private final boolean
pause
记录组件的字段。private final Component
title
记录组件的字段。 -
构造器概要
构造器构造器说明CommonDialogData
(Component title, Optional<Component> externalTitle, boolean canCloseWithEscape, boolean pause, DialogAction afterAction, List<DialogBody> body, List<Input> inputs) 创建CommonDialogData
记录类的实例。 -
方法概要
修饰符和类型方法说明返回afterAction
记录组件的值。body()
返回body
记录组件的值。boolean
返回canCloseWithEscape
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。返回externalTitle
记录组件的值。final int
hashCode()
返回此对象的哈希代码值。inputs()
返回inputs
记录组件的值。boolean
pause()
返回pause
记录组件的值。title()
返回title
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
title
title
记录组件的字段。 -
externalTitle
externalTitle
记录组件的字段。 -
canCloseWithEscape
private final boolean canCloseWithEscapecanCloseWithEscape
记录组件的字段。 -
pause
private final boolean pausepause
记录组件的字段。 -
afterAction
afterAction
记录组件的字段。 -
body
body
记录组件的字段。 -
inputs
inputs
记录组件的字段。 -
MAP_CODEC
-
-
构造器详细资料
-
CommonDialogData
public CommonDialogData(Component title, Optional<Component> externalTitle, boolean canCloseWithEscape, boolean pause, DialogAction afterAction, List<DialogBody> body, List<Input> inputs) 创建CommonDialogData
记录类的实例。- 参数:
title
-title
记录组件的值externalTitle
-externalTitle
记录组件的值canCloseWithEscape
-canCloseWithEscape
记录组件的值pause
-pause
记录组件的值afterAction
-afterAction
记录组件的值body
-body
记录组件的值inputs
-inputs
记录组件的值
-
-
方法详细资料
-
computeExternalTitle
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
title
返回title
记录组件的值。- 返回:
title
记录组件的值
-
externalTitle
返回externalTitle
记录组件的值。- 返回:
externalTitle
记录组件的值
-
canCloseWithEscape
public boolean canCloseWithEscape()返回canCloseWithEscape
记录组件的值。- 返回:
canCloseWithEscape
记录组件的值
-
pause
public boolean pause()返回pause
记录组件的值。- 返回:
pause
记录组件的值
-
afterAction
返回afterAction
记录组件的值。- 返回:
afterAction
记录组件的值
-
body
返回body
记录组件的值。- 返回:
body
记录组件的值
-
inputs
返回inputs
记录组件的值。- 返回:
inputs
记录组件的值
-