Record Class ConfiguredFeature<FC extends FeatureConfiguration,F extends Feature<FC>>
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.ConfiguredFeature<FC,F>
public record ConfiguredFeature<FC extends FeatureConfiguration,F extends Feature<FC>> (F extends Feature<FC> feature, FC extends FeatureConfiguration config)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<ConfiguredFeature<?,?>>> private final FCThe field for theconfigrecord component.static final com.mojang.serialization.Codec<ConfiguredFeature<?,?>> private final FThe field for thefeaturerecord component.static final com.mojang.serialization.Codec<HolderSet<ConfiguredFeature<?,?>>> -
Constructor Summary
ConstructorsConstructorDescriptionConfiguredFeature(F feature, FC config) Creates an instance of aConfiguredFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.feature()Returns the value of thefeaturerecord component.Stream<ConfiguredFeature<?,?>> final inthashCode()Returns a hash code value for this object.booleanplace(WorldGenLevel p_224954_, ChunkGenerator p_224955_, RandomSource p_224956_, BlockPos p_224957_) toString()Returns a string representation of this record class.
-
Field Details
-
feature
The field for thefeaturerecord component. -
config
The field for theconfigrecord component. -
DIRECT_CODEC
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
ConfiguredFeature
Creates an instance of aConfiguredFeaturerecord class.- Parameters:
feature- the value for thefeaturerecord componentconfig- the value for theconfigrecord component
-
-
Method Details
-
place
public boolean place(WorldGenLevel p_224954_, ChunkGenerator p_224955_, RandomSource p_224956_, BlockPos p_224957_) -
getFeatures
-
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). -
feature
Returns the value of thefeaturerecord component.- Returns:
- the value of the
featurerecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-