Class PlacementModifier

java.lang.Object
net.minecraft.world.gen.placementmodifier.PlacementModifier
Direct Known Subclasses:
AbstractConditionalPlacementModifier, AbstractCountPlacementModifier, CountMultilayerPlacementModifier, EnvironmentScanPlacementModifier, FixedPlacementModifier, HeightmapPlacementModifier, HeightRangePlacementModifier, RandomOffsetPlacementModifier, SquarePlacementModifier

public abstract class PlacementModifier extends Object
A placement modifier is a one-to-many position transformation, which takes a position with some context and returns zero or more positions. It's used to determine where to generate configured features.
See Also:
Mappings:
Namespace Name
named net/minecraft/world/gen/placementmodifier/PlacementModifier
intermediary net/minecraft/class_6797
official enq
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<PlacementModifier> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/world/gen/placementmodifier/PlacementModifier;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_35736 Lnet/minecraft/class_6797;field_35736:Lcom/mojang/serialization/Codec;
      official b Lenq;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • PlacementModifier

      public PlacementModifier()
  • Method Details

    • getPositions

      public abstract Stream<BlockPos> getPositions(FeaturePlacementContext context, Random random, BlockPos pos)
      Applies this placement modifier to the given position.
      Mappings:
      Namespace Name Mixin selector
      named getPositions Lnet/minecraft/world/gen/placementmodifier/PlacementModifier;getPositions(Lnet/minecraft/world/gen/feature/FeaturePlacementContext;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;
      intermediary method_14452 Lnet/minecraft/class_6797;method_14452(Lnet/minecraft/class_5444;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;
      official a_ Lenq;a_(Leno;Lbam;Ljh;)Ljava/util/stream/Stream;
    • getType

      public abstract PlacementModifierType<?> getType()
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/world/gen/placementmodifier/PlacementModifier;getType()Lnet/minecraft/world/gen/placementmodifier/PlacementModifierType;
      intermediary method_39615 Lnet/minecraft/class_6797;method_39615()Lnet/minecraft/class_6798;
      official b Lenq;b()Lenr;