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