Class FixedPlacementModifier
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.placement.PlacementModifier
com.github.darksoulq.abyssallib.world.gen.placement.modifier.FixedPlacementModifier
A placement modifier that completely overrides the procedural generation stream,
replacing it with a fixed, hardcoded list of specific coordinates.
This is highly useful for generating specific lore structures, quest elements, or testing features at exact, known locations without relying on random seeds.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<FixedPlacementModifier> The codec used for serializing and deserializing the fixed placement modifier.static final PlacementModifierType<FixedPlacementModifier> The registered type definition for the fixed placement modifier. -
Constructor Summary
ConstructorsConstructorDescriptionFixedPlacementModifier(List<org.bukkit.util.Vector> positions) Constructs a new FixedPlacementModifier. -
Method Summary
Modifier and TypeMethodDescriptionStream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Discards the incoming procedurally generated positions and returns the fixed list.getType()Retrieves the specific type definition for this modifier.
-
Field Details
-
CODEC
The codec used for serializing and deserializing the fixed placement modifier. -
TYPE
The registered type definition for the fixed placement modifier.
-
-
Constructor Details
-
FixedPlacementModifier
Constructs a new FixedPlacementModifier.- Parameters:
positions- The exact list of vectors to generate at.
-
-
Method Details
-
getPositions
public Stream<org.bukkit.util.Vector> getPositions(PlacementContext context, Stream<org.bukkit.util.Vector> positions) Discards the incoming procedurally generated positions and returns the fixed list.- Specified by:
getPositionsin classPlacementModifier- Parameters:
context- The current placement context.positions- The incoming stream (which is discarded).- Returns:
- A stream containing only the explicitly configured vectors.
-
getType
Retrieves the specific type definition for this modifier.- Specified by:
getTypein classPlacementModifier- Returns:
- The placement modifier type associated with this modifier.
-