Record Class WorldDataConfiguration
java.lang.Object
java.lang.Record
net.minecraft.world.level.WorldDataConfiguration
public record WorldDataConfiguration(DataPackConfig dataPacks, FeatureFlagSet enabledFeatures)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<WorldDataConfiguration> private final DataPackConfigThe field for thedataPacksrecord component.static final WorldDataConfigurationstatic final Stringprivate final FeatureFlagSetThe field for theenabledFeaturesrecord component.static final com.mojang.serialization.MapCodec<WorldDataConfiguration> -
Constructor Summary
ConstructorsConstructorDescriptionWorldDataConfiguration(DataPackConfig dataPacks, FeatureFlagSet enabledFeatures) Creates an instance of aWorldDataConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedataPacksrecord component.Returns the value of theenabledFeaturesrecord component.final booleanIndicates whether some other object is "equal to" this one.expandFeatures(FeatureFlagSet newEnabledFeatures) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
dataPacks
The field for thedataPacksrecord component. -
enabledFeatures
The field for theenabledFeaturesrecord component. -
ENABLED_FEATURES_ID
- See Also:
-
MAP_CODEC
-
CODEC
-
DEFAULT
-
-
Constructor Details
-
WorldDataConfiguration
Creates an instance of aWorldDataConfigurationrecord class.- Parameters:
dataPacks- the value for thedataPacksrecord componentenabledFeatures- the value for theenabledFeaturesrecord component
-
-
Method Details
-
expandFeatures
-
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). -
dataPacks
Returns the value of thedataPacksrecord component.- Returns:
- the value of the
dataPacksrecord component
-
enabledFeatures
Returns the value of theenabledFeaturesrecord component.- Returns:
- the value of the
enabledFeaturesrecord component
-