Class HeightPlacementFilter

java.lang.Object
net.minecraft.world.level.levelgen.placement.PlacementModifier
net.minecraft.world.level.levelgen.placement.PlacementFilter
org.moddingx.libx.sandbox.placement.HeightPlacementFilter

public class HeightPlacementFilter extends net.minecraft.world.level.levelgen.placement.PlacementFilter
A PlacementFilter for filtering by the absolute placement position.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<HeightPlacementFilter>
     
    static final net.minecraft.world.level.levelgen.placement.PlacementModifierType<HeightPlacementFilter>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeightPlacementFilter(net.minecraft.world.level.levelgen.VerticalAnchor minInclusive, net.minecraft.world.level.levelgen.VerticalAnchor maxInclusive)
    Creates a new HeightPlacementFilter.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    shouldPlace(net.minecraft.world.level.levelgen.placement.PlacementContext context, net.minecraft.util.RandomSource random, net.minecraft.core.BlockPos pos)
     
    net.minecraft.world.level.levelgen.placement.PlacementModifierType<?>
     

    Methods inherited from class net.minecraft.world.level.levelgen.placement.PlacementFilter

    getPositions

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<HeightPlacementFilter> CODEC
    • TYPE

      public static final net.minecraft.world.level.levelgen.placement.PlacementModifierType<HeightPlacementFilter> TYPE
  • Constructor Details

    • HeightPlacementFilter

      public HeightPlacementFilter(net.minecraft.world.level.levelgen.VerticalAnchor minInclusive, net.minecraft.world.level.levelgen.VerticalAnchor maxInclusive)
      Creates a new HeightPlacementFilter.
      Parameters:
      minInclusive - The minimum height the PlacedFeature can generate on.
      maxInclusive - The maximum height the PlacedFeature can generate on.
  • Method Details

    • type

      @Nonnull public net.minecraft.world.level.levelgen.placement.PlacementModifierType<?> type()
      Specified by:
      type in class net.minecraft.world.level.levelgen.placement.PlacementModifier
    • shouldPlace

      protected boolean shouldPlace(@Nonnull net.minecraft.world.level.levelgen.placement.PlacementContext context, @Nonnull net.minecraft.util.RandomSource random, @Nonnull net.minecraft.core.BlockPos pos)
      Specified by:
      shouldPlace in class net.minecraft.world.level.levelgen.placement.PlacementFilter