Record Class InitialWorldOptions
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screen.world.InitialWorldOptions
- Record Components:
selectedGameMode-gameRuleOverwrites-flatLevelPreset-
@Environment(CLIENT)
public record InitialWorldOptions(WorldCreator.Mode selectedGameMode, ServerGameRules gameRuleOverwrites, @Nullable RegistryKey<FlatLevelGeneratorPreset> flatLevelPreset)
extends Record
- Mappings:
Namespace Name named net/minecraft/client/gui/screen/world/InitialWorldOptionsintermediary net/minecraft/class_10220official gwsnamed selectedGameModeintermediary comp_3215official anamed gameRuleOverwritesintermediary comp_5181official bnamed flatLevelPresetintermediary comp_3217official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable RegistryKey<FlatLevelGeneratorPreset> The field for theflatLevelPresetrecord component.private final ServerGameRulesThe field for thegameRuleOverwritesrecord component.private final WorldCreator.ModeThe field for theselectedGameModerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionInitialWorldOptions(WorldCreator.Mode selectedGameMode, ServerGameRules gameRuleOverwrites, @Nullable RegistryKey<FlatLevelGeneratorPreset> flatLevelPreset) Creates an instance of aInitialWorldOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable RegistryKey<FlatLevelGeneratorPreset> Returns the value of theflatLevelPresetrecord component.Returns the value of thegameRuleOverwritesrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theselectedGameModerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
selectedGameMode
The field for theselectedGameModerecord component. -
gameRuleOverwrites
The field for thegameRuleOverwritesrecord component. -
flatLevelPreset
The field for theflatLevelPresetrecord component.
-
-
Constructor Details
-
InitialWorldOptions
public InitialWorldOptions(WorldCreator.Mode selectedGameMode, ServerGameRules gameRuleOverwrites, @Nullable RegistryKey<FlatLevelGeneratorPreset> flatLevelPreset) Creates an instance of aInitialWorldOptionsrecord class.- Parameters:
selectedGameMode- the value for theselectedGameModerecord componentgameRuleOverwrites- the value for thegameRuleOverwritesrecord componentflatLevelPreset- the value for theflatLevelPresetrecord 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 theselectedGameModerecord component.- Returns:
- the value of the
selectedGameModerecord component
-
gameRuleOverwrites
Returns the value of thegameRuleOverwritesrecord component.- Returns:
- the value of the
gameRuleOverwritesrecord component
-
flatLevelPreset
Returns the value of theflatLevelPresetrecord component.- Returns:
- the value of the
flatLevelPresetrecord component
-