Record Class WorldCreationContext
java.lang.Object
java.lang.Record
net.minecraft.client.gui.screens.worldselection.WorldCreationContext
public record WorldCreationContext(WorldGenSettings worldGenSettings, com.mojang.serialization.Lifecycle worldSettingsStability, RegistryAccess.Frozen registryAccess, ReloadableServerResources dataPackResources)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ReloadableServerResources
The field for thedataPackResources
record component.private final RegistryAccess.Frozen
The field for theregistryAccess
record component.private final WorldGenSettings
The field for theworldGenSettings
record component.private final com.mojang.serialization.Lifecycle
The field for theworldSettingsStability
record component. -
Constructor Summary
ConstructorDescriptionWorldCreationContext
(WorldGenSettings worldGenSettings, com.mojang.serialization.Lifecycle worldSettingsStability, RegistryAccess.Frozen registryAccess, ReloadableServerResources dataPackResources) Creates an instance of aWorldCreationContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataPackResources
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theregistryAccess
record component.final String
toString()
Returns a string representation of this record class.withSettings
(WorldCreationContext.SimpleUpdater p_233000_) withSettings
(WorldCreationContext.Updater p_233002_) withSettings
(WorldGenSettings p_232998_) Returns the value of theworldGenSettings
record component.com.mojang.serialization.Lifecycle
Returns the value of theworldSettingsStability
record component.
-
Field Details
-
worldGenSettings
The field for theworldGenSettings
record component. -
worldSettingsStability
private final com.mojang.serialization.Lifecycle worldSettingsStabilityThe field for theworldSettingsStability
record component. -
registryAccess
The field for theregistryAccess
record component. -
dataPackResources
The field for thedataPackResources
record component.
-
-
Constructor Details
-
WorldCreationContext
public WorldCreationContext(WorldGenSettings worldGenSettings, com.mojang.serialization.Lifecycle worldSettingsStability, RegistryAccess.Frozen registryAccess, ReloadableServerResources dataPackResources) Creates an instance of aWorldCreationContext
record class.- Parameters:
worldGenSettings
- the value for theworldGenSettings
record componentworldSettingsStability
- the value for theworldSettingsStability
record componentregistryAccess
- the value for theregistryAccess
record componentdataPackResources
- the value for thedataPackResources
record component
-
-
Method Details
-
withSettings
-
withSettings
-
withSettings
-
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)
. -
worldGenSettings
Returns the value of theworldGenSettings
record component.- Returns:
- the value of the
worldGenSettings
record component
-
worldSettingsStability
public com.mojang.serialization.Lifecycle worldSettingsStability()Returns the value of theworldSettingsStability
record component.- Returns:
- the value of the
worldSettingsStability
record component
-
registryAccess
Returns the value of theregistryAccess
record component.- Returns:
- the value of the
registryAccess
record component
-
dataPackResources
Returns the value of thedataPackResources
record component.- Returns:
- the value of the
dataPackResources
record component
-