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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<ConfiguredFeature<?,
?>>> private final FC
The field for theconfig
record component.static final com.mojang.serialization.Codec<ConfiguredFeature<?,
?>> private final F
The field for thefeature
record component.static final com.mojang.serialization.Codec<HolderSet<ConfiguredFeature<?,
?>>> -
Constructor Summary
ConstructorDescriptionConfiguredFeature
(F feature, FC config) Creates an instance of aConfiguredFeature
record class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()
Returns the value of theconfig
record component.final boolean
Indicates whether some other object is "equal to" this one.feature()
Returns the value of thefeature
record component.Stream<ConfiguredFeature<?,
?>> final int
hashCode()
Returns a hash code value for this object.boolean
place
(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 thefeature
record component. -
config
The field for theconfig
record component. -
DIRECT_CODEC
-
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
ConfiguredFeature
Creates an instance of aConfiguredFeature
record class.- Parameters:
feature
- the value for thefeature
record componentconfig
- the value for theconfig
record 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 thefeature
record component.- Returns:
- the value of the
feature
record component
-
config
Returns the value of theconfig
record component.- Returns:
- the value of the
config
record component
-