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 level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) toString()Returns a string representation of this record class.
-
Field Details
-
feature
-
config
The field for theconfigrecord component. -
DIRECT_CODEC
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
ConfiguredFeature
-
-
Method Details
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
getFeatures
-
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). -
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
-