Class BiomeTransitionModifier
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.placement.PlacementModifier
com.github.darksoulq.abyssallib.world.gen.placement.modifier.BiomeTransitionModifier
A placement modifier that prevents feature bleeding across chunk boundaries.
Features are often scattered outwards from the center of a chunk. If a feature scatters far enough, it may land in a neighboring chunk that has a completely different biome. This filter ensures that the exact target block's biome strictly matches the biome at the center of the generating chunk.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BiomeTransitionModifier> The codec used for serializing and deserializing the biome transition modifier.static final PlacementModifierType<BiomeTransitionModifier> The registered type definition for the biome transition placement modifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Filters the incoming positions by ensuring their exact biome matches the biome recorded at the geometric center of the active generation chunk.getType()Retrieves the specific type definition for this modifier.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the biome transition modifier. Since this modifier has no configurable parameters, it encodes to an empty object. -
TYPE
The registered type definition for the biome transition placement modifier.
-
-
Constructor Details
-
BiomeTransitionModifier
public BiomeTransitionModifier()Constructs a new BiomeTransitionModifier.
-
-
Method Details
-
getPositions
public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Filters the incoming positions by ensuring their exact biome matches the biome recorded at the geometric center of the active generation chunk.- Specified by:
getPositionsin classPlacementModifier- Parameters:
context- The current placement context.positions- The incoming stream of potential placement vectors.- Returns:
- A filtered stream of vectors residing within the correct biome.
-
getType
Retrieves the specific type definition for this modifier.- Specified by:
getTypein classPlacementModifier- Returns:
- The placement modifier type associated with this biome transition modifier.
-