Record Class RandomSelectorFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.RandomSelectorFeature
- All Implemented Interfaces:
Feature
@Deprecated
public record RandomSelectorFeature(List<WeightedPlacedFeature> features, Holder<PlacedFeature> defaultFeature)
extends Record
implements Feature
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<RandomSelectorFeature> Deprecated.private final Holder<PlacedFeature> Deprecated.The field for thedefaultFeaturerecord component.private final List<WeightedPlacedFeature> Deprecated.The field for thefeaturesrecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionRandomSelectorFeature(List<WeightedPlacedFeature> features, Holder<PlacedFeature> defaultFeature) Deprecated.Creates an instance of aRandomSelectorFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<RandomSelectorFeature> codec()Deprecated.Deprecated.Returns the value of thedefaultFeaturerecord component.final booleanDeprecated.Indicates whether some other object is "equal to" this one.features()Deprecated.Returns the value of thefeaturesrecord component.Deprecated.final inthashCode()Deprecated.Returns a hash code value for this object.booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) Deprecated.final StringtoString()Deprecated.Returns a string representation of this record class.Methods inherited from interface Feature
markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
features
Deprecated.The field for thefeaturesrecord component. -
defaultFeature
Deprecated.The field for thedefaultFeaturerecord component. -
CODEC
Deprecated.
-
-
Constructor Details
-
RandomSelectorFeature
public RandomSelectorFeature(List<WeightedPlacedFeature> features, Holder<PlacedFeature> defaultFeature) Deprecated.Creates an instance of aRandomSelectorFeaturerecord class.- Parameters:
features- the value for thefeaturesrecord componentdefaultFeature- the value for thedefaultFeaturerecord component
-
-
Method Details
-
codec
Deprecated. -
getSubFeatures
Deprecated.- Specified by:
getSubFeaturesin interfaceFeature
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) Deprecated. -
toString
-
hashCode
-
equals
Deprecated.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). -
features
Deprecated.Returns the value of thefeaturesrecord component.- Returns:
- the value of the
featuresrecord component
-
defaultFeature
Deprecated.Returns the value of thedefaultFeaturerecord component.- Returns:
- the value of the
defaultFeaturerecord component
-