Record Class 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set
<GameRules.Key<GameRules.BooleanValue>> The field for thedisabledGameRules
record component.private final ResourceKey
<FlatLevelGeneratorPreset> The field for theflatLevelPreset
record component.private final WorldCreationUiState.SelectedGameMode
The field for theselectedGameMode
record component. -
Constructor Summary
ConstructorsConstructorDescriptionInitialWorldCreationOptions
(WorldCreationUiState.SelectedGameMode selectedGameMode, Set<GameRules.Key<GameRules.BooleanValue>> disabledGameRules, ResourceKey<FlatLevelGeneratorPreset> flatLevelPreset) Creates an instance of aInitialWorldCreationOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisabledGameRules
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theflatLevelPreset
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theselectedGameMode
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
selectedGameMode
The field for theselectedGameMode
record component. -
disabledGameRules
The field for thedisabledGameRules
record component. -
flatLevelPreset
The field for theflatLevelPreset
record component.
-
-
Constructor Details
-
InitialWorldCreationOptions
public InitialWorldCreationOptions(WorldCreationUiState.SelectedGameMode selectedGameMode, Set<GameRules.Key<GameRules.BooleanValue>> disabledGameRules, @Nullable ResourceKey<FlatLevelGeneratorPreset> flatLevelPreset) Creates an instance of aInitialWorldCreationOptions
record class.- Parameters:
selectedGameMode
- the value for theselectedGameMode
record componentdisabledGameRules
- the value for thedisabledGameRules
record componentflatLevelPreset
- the value for theflatLevelPreset
record component
-
-
Method Details
-
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)
. -
selectedGameMode
Returns the value of theselectedGameMode
record component.- Returns:
- the value of the
selectedGameMode
record component
-
disabledGameRules
Returns the value of thedisabledGameRules
record component.- Returns:
- the value of the
disabledGameRules
record component
-
flatLevelPreset
Returns the value of theflatLevelPreset
record component.- Returns:
- the value of the
flatLevelPreset
record component
-