Record Class OverlayFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.OverlayFeature
- All Implemented Interfaces:
Feature
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<OverlayFeature> private final HolderSet<PlacedFeature> The field for thefeaturesrecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionOverlayFeature(HolderSet<PlacedFeature> features) Creates an instance of aOverlayFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<OverlayFeature> 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
-
OverlayFeature
Creates an instance of aOverlayFeaturerecord 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
-