Record Class WeightedPlacedFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.WeightedPlacedFeature
@Deprecated
public record WeightedPlacedFeature(Holder<PlacedFeature> feature, float chance)
extends Record
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatDeprecated.The field for thechancerecord component.static final com.mojang.serialization.Codec<WeightedPlacedFeature> Deprecated.private final Holder<PlacedFeature> Deprecated.The field for thefeaturerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWeightedPlacedFeature(Holder<PlacedFeature> feature, float chance) Deprecated.Creates an instance of aWeightedPlacedFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatchance()Deprecated.Returns the value of thechancerecord component.final booleanDeprecated.Indicates whether some other object is "equal to" this one.feature()Deprecated.Returns the value of thefeaturerecord component.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.
-
Field Details
-
feature
-
chance
private final float chanceDeprecated.The field for thechancerecord component. -
CODEC
Deprecated.
-
-
Constructor Details
-
WeightedPlacedFeature
Deprecated.Creates an instance of aWeightedPlacedFeaturerecord class.- Parameters:
feature- the value for thefeaturerecord componentchance- the value for thechancerecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
feature
Deprecated.Returns the value of thefeaturerecord component.- Returns:
- the value of the
featurerecord component
-
chance
public float chance()Deprecated.Returns the value of thechancerecord component.- Returns:
- the value of the
chancerecord component
-