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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<HeightPlacementFilter>
static final net.minecraft.world.level.levelgen.placement.PlacementModifierType<HeightPlacementFilter>
-
Constructor Summary
ConstructorDescriptionHeightPlacementFilter
(net.minecraft.world.level.levelgen.VerticalAnchor minInclusive, net.minecraft.world.level.levelgen.VerticalAnchor maxInclusive) Creates a newHeightPlacementFilter
. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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<?>
type()
Methods inherited from class net.minecraft.world.level.levelgen.placement.PlacementFilter
getPositions
-
Field Details
-
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 newHeightPlacementFilter
.- Parameters:
minInclusive
- The minimum height thePlacedFeature
can generate on.maxInclusive
- The maximum height thePlacedFeature
can generate on.
-
-
Method Details
-
type
- Specified by:
type
in classnet.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 classnet.minecraft.world.level.levelgen.placement.PlacementFilter
-