Package net.minecraft.world.gen.feature
Record Class PlacedFeature
java.lang.Object
java.lang.Record
net.minecraft.world.gen.feature.PlacedFeature
- Record Components:
- feature-
- placementModifiers-
public record PlacedFeature(RegistryEntry<ConfiguredFeature<?,?>> feature, List<PlacementModifier> placementModifiers)
extends Record 
- Mappings:
- Namespace - Name - official - dre- intermediary - net/minecraft/class_6796- named - net/minecraft/world/gen/feature/PlacedFeature- official - e- intermediary - comp_334- named - feature- official - f- intermediary - comp_335- named - placementModifiers
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlacedFeature>private final RegistryEntry<ConfiguredFeature<?,?>> The field for thefeaturerecord component.static final com.mojang.serialization.Codec<RegistryEntryList<PlacedFeature>>static final com.mojang.serialization.Codec<List<RegistryEntryList<PlacedFeature>>>private final List<PlacementModifier>The field for theplacementModifiersrecord component.static final com.mojang.serialization.Codec<RegistryEntry<PlacedFeature>>
- 
Constructor SummaryConstructorsConstructorDescriptionPlacedFeature(RegistryEntry<ConfiguredFeature<?, ?>> registryEntry, List<PlacementModifier> placementModifiers) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.feature()Returns the value of thefeaturerecord component.private booleangenerate(FeaturePlacementContext context, Random random, BlockPos pos) booleangenerate(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos pos) Generates a configured feature at the positions obtained by applying placement modifiers to the given position.booleangenerateUnregistered(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos pos) Stream<ConfiguredFeature<?,?>> final inthashCode()Returns a hash code value for this object.Returns the value of theplacementModifiersrecord component.toString()Returns a string representation of this record class.
- 
Field Details- 
featureThe field for thefeaturerecord component.
- 
placementModifiersThe field for theplacementModifiersrecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldre;a:Lcom/mojang/serialization/Codec;- intermediary - field_35729- Lnet/minecraft/class_6796;field_35729:Lcom/mojang/serialization/Codec;- named - CODEC- Lnet/minecraft/world/gen/feature/PlacedFeature;CODEC:Lcom/mojang/serialization/Codec;
 
- 
REGISTRY_CODEC- Mappings:
- Namespace - Name - Mixin selector - official - b- Ldre;b:Lcom/mojang/serialization/Codec;- intermediary - field_35730- Lnet/minecraft/class_6796;field_35730:Lcom/mojang/serialization/Codec;- named - REGISTRY_CODEC- Lnet/minecraft/world/gen/feature/PlacedFeature;REGISTRY_CODEC:Lcom/mojang/serialization/Codec;
 
- 
LIST_CODEC- Mappings:
- Namespace - Name - Mixin selector - official - c- Ldre;c:Lcom/mojang/serialization/Codec;- intermediary - field_35731- Lnet/minecraft/class_6796;field_35731:Lcom/mojang/serialization/Codec;- named - LIST_CODEC- Lnet/minecraft/world/gen/feature/PlacedFeature;LIST_CODEC:Lcom/mojang/serialization/Codec;
 
- 
LISTS_CODECpublic static final com.mojang.serialization.Codec<List<RegistryEntryList<PlacedFeature>>> LISTS_CODEC- Mappings:
- Namespace - Name - Mixin selector - official - d- Ldre;d:Lcom/mojang/serialization/Codec;- intermediary - field_36416- Lnet/minecraft/class_6796;field_36416:Lcom/mojang/serialization/Codec;- named - LISTS_CODEC- Lnet/minecraft/world/gen/feature/PlacedFeature;LISTS_CODEC:Lcom/mojang/serialization/Codec;
 
 
- 
- 
Constructor Details- 
PlacedFeaturepublic PlacedFeature(RegistryEntry<ConfiguredFeature<?, ?>> registryEntry, List<PlacementModifier> placementModifiers) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Ldre;<init>(Lhe;Ljava/util/List;)V- intermediary - <init>- Lnet/minecraft/class_6796;<init>(Lnet/minecraft/class_6880;Ljava/util/List;)V- named - <init>- Lnet/minecraft/world/gen/feature/PlacedFeature;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Ljava/util/List;)V
 
 
- 
- 
Method Details- 
generateUnregisteredpublic boolean generateUnregistered(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos pos) - Mappings:
- Namespace - Name - Mixin selector - official - a- Ldre;a(Lcng;Lddy;Lapf;Lgu;)Z- intermediary - method_39644- Lnet/minecraft/class_6796;method_39644(Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Z- named - generateUnregistered- Lnet/minecraft/world/gen/feature/PlacedFeature;generateUnregistered(Lnet/minecraft/world/StructureWorldAccess;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Z
 
- 
generatepublic boolean generate(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos pos) Generates a configured feature at the positions obtained by applying placement modifiers to the given position.To calculate positions, it first creates a singleton stream of the given position, then it applies placement modifiers with flatMap in order they appear in the list. - Mappings:
- Namespace - Name - Mixin selector - official - b- Ldre;b(Lcng;Lddy;Lapf;Lgu;)Z- intermediary - method_39650- Lnet/minecraft/class_6796;method_39650(Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Z- named - generate- Lnet/minecraft/world/gen/feature/PlacedFeature;generate(Lnet/minecraft/world/StructureWorldAccess;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Z
 
- 
generate- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldre;a(Ldrf;Lapf;Lgu;)Z- intermediary - method_39648- Lnet/minecraft/class_6796;method_39648(Lnet/minecraft/class_5444;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Z- named - generate- Lnet/minecraft/world/gen/feature/PlacedFeature;generate(Lnet/minecraft/world/gen/feature/FeaturePlacementContext;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Z
 
- 
getDecoratedFeatures- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldre;a()Ljava/util/stream/Stream;- intermediary - method_39643- Lnet/minecraft/class_6796;method_39643()Ljava/util/stream/Stream;- named - getDecoratedFeatures- Lnet/minecraft/world/gen/feature/PlacedFeature;getDecoratedFeatures()Ljava/util/stream/Stream;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
featureReturns the value of thefeaturerecord component.- Returns:
- the value of the featurerecord component
 
- 
placementModifiersReturns the value of theplacementModifiersrecord component.- Returns:
- the value of the placementModifiersrecord component
 
 
-