Record Class RandomFeatureConfiguration

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.RandomFeatureConfiguration
All Implemented Interfaces:
FeatureConfiguration

@Deprecated public record RandomFeatureConfiguration(List<WeightedPlacedFeature> features, Holder<PlacedFeature> defaultFeature) extends Record implements FeatureConfiguration
Deprecated.
  • Field Details

    • features

      private final List<WeightedPlacedFeature> features
      Deprecated.
      The field for the features record component.
    • defaultFeature

      private final Holder<PlacedFeature> defaultFeature
      Deprecated.
      The field for the defaultFeature record component.
    • CODEC

      public static final com.mojang.serialization.Codec<RandomFeatureConfiguration> CODEC
      Deprecated.
  • Constructor Details

    • RandomFeatureConfiguration

      public RandomFeatureConfiguration(List<WeightedPlacedFeature> features, Holder<PlacedFeature> defaultFeature)
      Deprecated.
      Creates an instance of a RandomFeatureConfiguration record class.
      Parameters:
      features - the value for the features record component
      defaultFeature - the value for the defaultFeature record component
  • Method Details

    • getSubFeatures

      public Stream<Holder<ConfiguredFeature<?,?>>> getSubFeatures()
      Deprecated.
      Specified by:
      getSubFeatures in interface FeatureConfiguration
    • toString

      public final String toString()
      Deprecated.
      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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Deprecated.
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • features

      public List<WeightedPlacedFeature> features()
      Deprecated.
      Returns the value of the features record component.
      Returns:
      the value of the features record component
    • defaultFeature

      public Holder<PlacedFeature> defaultFeature()
      Deprecated.
      Returns the value of the defaultFeature record component.
      Returns:
      the value of the defaultFeature record component