Class PlacementModifier

java.lang.Object
net.minecraft.world.gen.placementmodifier.PlacementModifier
Direct Known Subclasses:
AbstractConditionalPlacementModifier, AbstractCountPlacementModifier, CarvingMaskPlacementModifier, CountMultilayerPlacementModifier, EnvironmentScanPlacementModifier, 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
official djm
intermediary net/minecraft/class_6797
named net/minecraft/world/gen/placementmodifier/PlacementModifier
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<PlacementModifier> CODEC
      Mappings:
      Namespace Name Mixin selector
      official b Ldjm;b:Lcom/mojang/serialization/Codec;
      intermediary field_35736 Lnet/minecraft/class_6797;field_35736:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/world/gen/placementmodifier/PlacementModifier;CODEC: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
      official a_ Ldjm;a_(Ldjk;Lalu;Lgt;)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;
      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;
    • getType

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