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
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReloadableServerResourcesThe field for thedataPackResourcesrecord component.private final RegistryAccess.FrozenThe field for theregistryAccessrecord component.private final WorldGenSettingsThe field for theworldGenSettingsrecord component.private final com.mojang.serialization.LifecycleThe field for theworldSettingsStabilityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWorldCreationContext(WorldGenSettings worldGenSettings, com.mojang.serialization.Lifecycle worldSettingsStability, RegistryAccess.Frozen registryAccess, ReloadableServerResources dataPackResources) Creates an instance of aWorldCreationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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 theregistryAccessrecord component.final StringtoString()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 theworldGenSettingsrecord component.com.mojang.serialization.LifecycleReturns the value of theworldSettingsStabilityrecord component.
-
Field Details
-
worldGenSettings
The field for theworldGenSettingsrecord component. -
worldSettingsStability
private final com.mojang.serialization.Lifecycle worldSettingsStabilityThe field for theworldSettingsStabilityrecord component. -
registryAccess
The field for theregistryAccessrecord component. -
dataPackResources
The field for thedataPackResourcesrecord component.
-
-
Constructor Details
-
WorldCreationContext
public WorldCreationContext(WorldGenSettings worldGenSettings, com.mojang.serialization.Lifecycle worldSettingsStability, RegistryAccess.Frozen registryAccess, ReloadableServerResources dataPackResources) Creates an instance of aWorldCreationContextrecord class.- Parameters:
worldGenSettings- the value for theworldGenSettingsrecord componentworldSettingsStability- the value for theworldSettingsStabilityrecord componentregistryAccess- the value for theregistryAccessrecord componentdataPackResources- the value for thedataPackResourcesrecord 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 theworldGenSettingsrecord component.- Returns:
- the value of the
worldGenSettingsrecord component
-
worldSettingsStability
public com.mojang.serialization.Lifecycle worldSettingsStability()Returns the value of theworldSettingsStabilityrecord component.- Returns:
- the value of the
worldSettingsStabilityrecord component
-
registryAccess
Returns the value of theregistryAccessrecord component.- Returns:
- the value of the
registryAccessrecord component
-
dataPackResources
Returns the value of thedataPackResourcesrecord component.- Returns:
- the value of the
dataPackResourcesrecord component
-