Class PlacementModifier

java.lang.Object
net.minecraft.world.gen.decorator.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 ddz
intermediary net/minecraft/class_6797
named net/minecraft/world/gen/decorator/PlacementModifier
  • Field Details

    • CODEC

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

    • PlacementModifier

      public PlacementModifier()
  • Method Details

    • getPositions

      public abstract Stream<BlockPos> getPositions(DecoratorContext context, Random random, BlockPos pos)
      Applies this placement modifier to the given position.
      Mappings:
      Namespace Name Mixin selector
      official a_ Lddz;a_(Lddx;Ljava/util/Random;Lgh;)Ljava/util/stream/Stream;
      intermediary method_14452 Lnet/minecraft/class_6797;method_14452(Lnet/minecraft/class_5444;Ljava/util/Random;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;
      named getPositions Lnet/minecraft/world/gen/decorator/PlacementModifier;getPositions(Lnet/minecraft/world/gen/decorator/DecoratorContext;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;)Ljava/util/stream/Stream;
    • getType

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