Record Class WorldCreationContext
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screens.worldselection.WorldCreationContext
public record WorldCreationContext(WorldOptions options, Registry<LevelStem> datapackDimensions, WorldDimensions selectedDimensions, LayeredRegistryAccess<RegistryLayer> worldgenRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WorldDataConfigurationThe field for thedataConfigurationrecord component.The field for thedatapackDimensionsrecord component.private final ReloadableServerResourcesThe field for thedataPackResourcesrecord component.private final InitialWorldCreationOptionsThe field for theinitialWorldCreationOptionsrecord component.private final WorldOptionsThe field for theoptionsrecord component.private final WorldDimensionsThe field for theselectedDimensionsrecord component.private final LayeredRegistryAccess<RegistryLayer> The field for theworldgenRegistriesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWorldCreationContext(WorldGenSettings worldGenSettings, LayeredRegistryAccess<RegistryLayer> loadedRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration) WorldCreationContext(WorldOptions options, Registry<LevelStem> datapackDimensions, WorldDimensions selectedDimensions, LayeredRegistryAccess<RegistryLayer> worldgenRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions) Creates an instance of aWorldCreationContextrecord class.WorldCreationContext(WorldOptions worldOptions, WorldDimensions worldDimensions, LayeredRegistryAccess<RegistryLayer> loadedRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataConfigurationrecord component.Returns the value of thedatapackDimensionsrecord component.Returns the value of thedataPackResourcesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialWorldCreationOptionsrecord component.options()Returns the value of theoptionsrecord component.Returns the value of theselectedDimensionsrecord component.final StringtoString()Returns a string representation of this record class.voidvalidate()withDataConfiguration(WorldDataConfiguration dataConfiguration) withSettings(WorldOptions options, WorldDimensions dimensions) Returns the value of theworldgenRegistriesrecord component.
-
Field Details
-
options
The field for theoptionsrecord component. -
datapackDimensions
-
selectedDimensions
The field for theselectedDimensionsrecord component. -
worldgenRegistries
The field for theworldgenRegistriesrecord component. -
dataPackResources
The field for thedataPackResourcesrecord component. -
dataConfiguration
The field for thedataConfigurationrecord component. -
initialWorldCreationOptions
The field for theinitialWorldCreationOptionsrecord component.
-
-
Constructor Details
-
WorldCreationContext
public WorldCreationContext(WorldGenSettings worldGenSettings, LayeredRegistryAccess<RegistryLayer> loadedRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration) -
WorldCreationContext
public WorldCreationContext(WorldOptions worldOptions, WorldDimensions worldDimensions, LayeredRegistryAccess<RegistryLayer> loadedRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions) -
WorldCreationContext
public WorldCreationContext(WorldOptions options, Registry<LevelStem> datapackDimensions, WorldDimensions selectedDimensions, LayeredRegistryAccess<RegistryLayer> worldgenRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration, InitialWorldCreationOptions initialWorldCreationOptions) Creates an instance of aWorldCreationContextrecord class.- Parameters:
options- the value for theoptionsrecord componentdatapackDimensions- the value for thedatapackDimensionsrecord componentselectedDimensions- the value for theselectedDimensionsrecord componentworldgenRegistries- the value for theworldgenRegistriesrecord componentdataPackResources- the value for thedataPackResourcesrecord componentdataConfiguration- the value for thedataConfigurationrecord componentinitialWorldCreationOptions- the value for theinitialWorldCreationOptionsrecord component
-
-
Method Details
-
withSettings
-
withOptions
-
withDimensions
-
withDataConfiguration
-
worldgenLoadContext
-
validate
public void validate() -
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. All components in this record class are compared withObjects::equals(Object,Object). -
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
datapackDimensions
-
selectedDimensions
Returns the value of theselectedDimensionsrecord component.- Returns:
- the value of the
selectedDimensionsrecord component
-
worldgenRegistries
Returns the value of theworldgenRegistriesrecord component.- Returns:
- the value of the
worldgenRegistriesrecord component
-
dataPackResources
Returns the value of thedataPackResourcesrecord component.- Returns:
- the value of the
dataPackResourcesrecord component
-
dataConfiguration
Returns the value of thedataConfigurationrecord component.- Returns:
- the value of the
dataConfigurationrecord component
-
initialWorldCreationOptions
Returns the value of theinitialWorldCreationOptionsrecord component.- Returns:
- the value of the
initialWorldCreationOptionsrecord component
-