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)
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 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 p_249130_, LayeredRegistryAccess<RegistryLayer> p_248513_, ReloadableServerResources p_251786_, WorldDataConfiguration p_248593_) WorldCreationContext(WorldOptions options, Registry<LevelStem> datapackDimensions, WorldDimensions selectedDimensions, LayeredRegistryAccess<RegistryLayer> worldgenRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration) Creates an instance of aWorldCreationContextrecord class.WorldCreationContext(WorldOptions p_249836_, WorldDimensions p_250641_, LayeredRegistryAccess<RegistryLayer> p_251794_, ReloadableServerResources p_250560_, WorldDataConfiguration p_248539_) -
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.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) withOptions(WorldCreationContext.OptionsModifier p_252288_) withSettings(WorldOptions p_249492_, WorldDimensions p_250298_) Returns the value of theworldgenRegistriesrecord component.
-
Field Details
-
options
The field for theoptionsrecord component. -
datapackDimensions
The field for thedatapackDimensionsrecord component. -
selectedDimensions
The field for theselectedDimensionsrecord component. -
worldgenRegistries
The field for theworldgenRegistriesrecord component. -
dataPackResources
The field for thedataPackResourcesrecord component. -
dataConfiguration
The field for thedataConfigurationrecord component.
-
-
Constructor Details
-
WorldCreationContext
public WorldCreationContext(WorldGenSettings p_249130_, LayeredRegistryAccess<RegistryLayer> p_248513_, ReloadableServerResources p_251786_, WorldDataConfiguration p_248593_) -
WorldCreationContext
public WorldCreationContext(WorldOptions p_249836_, WorldDimensions p_250641_, LayeredRegistryAccess<RegistryLayer> p_251794_, ReloadableServerResources p_250560_, WorldDataConfiguration p_248539_) -
WorldCreationContext
public WorldCreationContext(WorldOptions options, Registry<LevelStem> datapackDimensions, WorldDimensions selectedDimensions, LayeredRegistryAccess<RegistryLayer> worldgenRegistries, ReloadableServerResources dataPackResources, WorldDataConfiguration dataConfiguration) 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 component
-
-
Method Details
-
withSettings
-
withOptions
-
withDimensions
-
withDataConfiguration
-
worldgenLoadContext
-
validate
public void validate() -
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). -
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
datapackDimensions
Returns the value of thedatapackDimensionsrecord component.- Returns:
- the value of the
datapackDimensionsrecord component
-
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
-