Class BlockFilterModifier
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.placement.PlacementModifier
com.github.darksoulq.abyssallib.world.gen.placement.modifier.BlockFilterModifier
A placement modifier that filters out incoming positions based on the target block type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockFilterModifier> The codec used for serializing and deserializing the block filter modifier.static final PlacementModifierType<BlockFilterModifier> The registered type definition for the block filter placement modifier. -
Constructor Summary
ConstructorsConstructorDescriptionBlockFilterModifier(List<BlockInfo> targets, org.bukkit.util.Vector offset) Constructs a new BlockFilterModifier. -
Method Summary
Modifier and TypeMethodDescriptionStream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Filters the incoming positions by checking if the targeted block matches the allowed list.getType()Retrieves the specific type definition for this modifier.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the block filter modifier. -
TYPE
The registered type definition for the block filter placement modifier.
-
-
Constructor Details
-
BlockFilterModifier
-
-
Method Details
-
getPositions
public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Filters the incoming positions by checking if the targeted block matches the allowed list.- Specified by:
getPositionsin classPlacementModifier- Parameters:
context- The current placement context.positions- The incoming stream of potential placement vectors.- Returns:
- A filtered stream containing only valid vectors.
-
getType
Retrieves the specific type definition for this modifier.- Specified by:
getTypein classPlacementModifier- Returns:
- The placement modifier type associated with this block filter modifier.
-