Package net.minecraft.server
Record Class WorldLoader.DataLoadContext
java.lang.Object
java.lang.Record
net.minecraft.server.WorldLoader.DataLoadContext
- Enclosing class:
WorldLoader
public static record WorldLoader.DataLoadContext(ResourceManager resources, WorldDataConfiguration dataConfiguration, RegistryAccess.Frozen datapackWorldgen, RegistryAccess.Frozen datapackDimensions)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WorldDataConfigurationThe field for thedataConfigurationrecord component.private final RegistryAccess.FrozenThe field for thedatapackDimensionsrecord component.private final RegistryAccess.FrozenThe field for thedatapackWorldgenrecord component.private final ResourceManagerThe field for theresourcesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDataLoadContext(ResourceManager resources, WorldDataConfiguration dataConfiguration, RegistryAccess.Frozen datapackWorldgen, RegistryAccess.Frozen datapackDimensions) Creates an instance of aDataLoadContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataConfigurationrecord component.Returns the value of thedatapackDimensionsrecord component.Returns the value of thedatapackWorldgenrecord 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 theresourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
resources
The field for theresourcesrecord component. -
dataConfiguration
The field for thedataConfigurationrecord component. -
datapackWorldgen
The field for thedatapackWorldgenrecord component. -
datapackDimensions
The field for thedatapackDimensionsrecord component.
-
-
Constructor Details
-
DataLoadContext
public DataLoadContext(ResourceManager resources, WorldDataConfiguration dataConfiguration, RegistryAccess.Frozen datapackWorldgen, RegistryAccess.Frozen datapackDimensions) Creates an instance of aDataLoadContextrecord class.- Parameters:
resources- the value for theresourcesrecord componentdataConfiguration- the value for thedataConfigurationrecord componentdatapackWorldgen- the value for thedatapackWorldgenrecord componentdatapackDimensions- the value for thedatapackDimensionsrecord 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). -
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-
dataConfiguration
Returns the value of thedataConfigurationrecord component.- Returns:
- the value of the
dataConfigurationrecord component
-
datapackWorldgen
Returns the value of thedatapackWorldgenrecord component.- Returns:
- the value of the
datapackWorldgenrecord component
-
datapackDimensions
Returns the value of thedatapackDimensionsrecord component.- Returns:
- the value of the
datapackDimensionsrecord component
-