记录类 InitialWorldCreationOptions
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screens.worldselection.InitialWorldCreationOptions
public record InitialWorldCreationOptions(WorldCreationUiState.SelectedGameMode selectedGameMode, Set<GameRules.Key<GameRules.BooleanValue>> disabledGameRules, @Nullable ResourceKey<FlatLevelGeneratorPreset> flatLevelPreset)
extends Record
-
字段概要
字段修饰符和类型字段说明private final Set
<GameRules.Key<GameRules.BooleanValue>> disabledGameRules
记录组件的字段。private final ResourceKey
<FlatLevelGeneratorPreset> flatLevelPreset
记录组件的字段。private final WorldCreationUiState.SelectedGameMode
selectedGameMode
记录组件的字段。 -
构造器概要
构造器构造器说明InitialWorldCreationOptions
(WorldCreationUiState.SelectedGameMode selectedGameMode, Set<GameRules.Key<GameRules.BooleanValue>> disabledGameRules, ResourceKey<FlatLevelGeneratorPreset> flatLevelPreset) 创建InitialWorldCreationOptions
记录类的实例。 -
方法概要
-
字段详细资料
-
selectedGameMode
selectedGameMode
记录组件的字段。 -
disabledGameRules
disabledGameRules
记录组件的字段。 -
flatLevelPreset
flatLevelPreset
记录组件的字段。
-
-
构造器详细资料
-
InitialWorldCreationOptions
public InitialWorldCreationOptions(WorldCreationUiState.SelectedGameMode selectedGameMode, Set<GameRules.Key<GameRules.BooleanValue>> disabledGameRules, @Nullable ResourceKey<FlatLevelGeneratorPreset> flatLevelPreset) 创建InitialWorldCreationOptions
记录类的实例。- 参数:
selectedGameMode
-selectedGameMode
记录组件的值disabledGameRules
-disabledGameRules
记录组件的值flatLevelPreset
-flatLevelPreset
记录组件的值
-
-
方法详细资料
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
selectedGameMode
返回selectedGameMode
记录组件的值。- 返回:
selectedGameMode
记录组件的值
-
disabledGameRules
返回disabledGameRules
记录组件的值。- 返回:
disabledGameRules
记录组件的值
-
flatLevelPreset
返回flatLevelPreset
记录组件的值。- 返回:
flatLevelPreset
记录组件的值
-