Record Class ConfiguredFeature<FC extends FeatureConfig,F extends Feature<FC>>

java.lang.Object
java.lang.Record
net.minecraft.world.gen.feature.ConfiguredFeature<FC,F>
Record Components:
feature -
config -

public record ConfiguredFeature<FC extends FeatureConfig,F extends Feature<FC>>(F extends Feature<FC> feature, FC extends FeatureConfig config) extends Record
Mappings:
Namespace Name
official dgs
intermediary net/minecraft/class_2975
named net/minecraft/world/gen/feature/ConfiguredFeature
official d
intermediary comp_332
named feature
official e
intermediary comp_333
named config
  • Field Details

    • feature

      private final F extends Feature<FC> feature
      The field for the feature record component.
    • config

      private final FC extends FeatureConfig config
      The field for the config record component.
    • CODEC

      public static final com.mojang.serialization.Codec<ConfiguredFeature<?,?>> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ldgs;a:Lcom/mojang/serialization/Codec;
      intermediary field_25833 Lnet/minecraft/class_2975;field_25833:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/world/gen/feature/ConfiguredFeature;CODEC:Lcom/mojang/serialization/Codec;
    • REGISTRY_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntry<ConfiguredFeature<?,?>>> REGISTRY_CODEC
      Mappings:
      Namespace Name Mixin selector
      official b Ldgs;b:Lcom/mojang/serialization/Codec;
      intermediary field_24833 Lnet/minecraft/class_2975;field_24833:Lcom/mojang/serialization/Codec;
      named REGISTRY_CODEC Lnet/minecraft/world/gen/feature/ConfiguredFeature;REGISTRY_CODEC:Lcom/mojang/serialization/Codec;
    • LIST_CODEC

      public static final com.mojang.serialization.Codec<RegistryEntryList<ConfiguredFeature<?,?>>> LIST_CODEC
      Mappings:
      Namespace Name Mixin selector
      official c Ldgs;c:Lcom/mojang/serialization/Codec;
      intermediary field_26756 Lnet/minecraft/class_2975;field_26756:Lcom/mojang/serialization/Codec;
      named LIST_CODEC Lnet/minecraft/world/gen/feature/ConfiguredFeature;LIST_CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • ConfiguredFeature

      public ConfiguredFeature(F feature, FC config)
      Creates an instance of a ConfiguredFeature record class.
      Parameters:
      feature - the value for the feature record component
      config - the value for the config record component
  • Method Details

    • generate

      public boolean generate(StructureWorldAccess world, ChunkGenerator chunkGenerator, Random random, BlockPos origin)
      Mappings:
      Namespace Name Mixin selector
      official a Ldgs;a(Lckp;Ldaq;Laoh;Lgp;)Z
      intermediary method_12862 Lnet/minecraft/class_2975;method_12862(Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Z
      named generate Lnet/minecraft/world/gen/feature/ConfiguredFeature;generate(Lnet/minecraft/world/StructureWorldAccess;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Z
    • getDecoratedFeatures

      public Stream<ConfiguredFeature<?,?>> getDecoratedFeatures()
      Mappings:
      Namespace Name Mixin selector
      official a Ldgs;a()Ljava/util/stream/Stream;
      intermediary method_30648 Lnet/minecraft/class_2975;method_30648()Ljava/util/stream/Stream;
      named getDecoratedFeatures Lnet/minecraft/world/gen/feature/ConfiguredFeature;getDecoratedFeatures()Ljava/util/stream/Stream;
    • toString

      public String toString()
      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()
      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 object)
      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:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • feature

      public F feature()
      Returns the value of the feature record component.
      Returns:
      the value of the feature record component
    • config

      public FC config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component