java.lang.Object
com.github.darksoulq.abyssallib.world.structure.Structure

public class Structure extends Object
Represents a fully captured, transformable, and replayable structure definition. This implementation supports palette-based block storage for deduplication, relative positioning for blocks and entities, transformation via rotations and mirrors, and both synchronous and asynchronous placement routines.
  • Field Details

  • Constructor Details

  • Method Details

    • fill

      public CompletableFuture<Void> fill(@NotNull @NotNull org.bukkit.Location corner1, @NotNull @NotNull org.bukkit.Location corner2, @NotNull @NotNull org.bukkit.Location origin)
      Captures all blocks within the defined region, excluding entities.
      Parameters:
      corner1 - The first corner Location bounding the region.
      corner2 - The opposite corner Location bounding the region.
      origin - The designated origin Location utilized for relative positioning.
    • fill

      public CompletableFuture<Void> fill(@NotNull @NotNull org.bukkit.Location corner1, @NotNull @NotNull org.bukkit.Location corner2, @NotNull @NotNull org.bukkit.Location origin, boolean includeEntities)
      Captures blocks and optionally entities within the defined physical region. Regional processor dynamically executes chunk-safe block mapping on Folia or Bukkit.
      Parameters:
      corner1 - The first corner Location bounding the region.
      corner2 - The opposite corner Location bounding the region.
      origin - The origin Location used for zero-point relative alignment.
      includeEntities - True if entities within the bounding box should be captured and serialized.
    • placeAsync

      public CompletableFuture<Void> placeAsync(@NotNull @NotNull org.bukkit.Location origin, @NotNull @NotNull org.bukkit.block.structure.StructureRotation rotation, @NotNull @NotNull org.bukkit.block.structure.Mirror mirror, float integrity, int blocksPerTick)
      Places this structure asynchronously using a scheduled repeating task securely evaluating regional boundaries.
      Parameters:
      origin - The target placement origin Location.
      rotation - The StructureRotation to apply.
      mirror - The Mirror transformation to apply.
      integrity - The survival chance [0.0 - 1.0] for each individual block.
      blocksPerTick - The maximum number of blocks to process per execution slice.
      Returns:
      A CompletableFuture that resolves when the entire placement operation completes.
    • place

      public void place(@NotNull @NotNull org.bukkit.Location origin, @NotNull @NotNull org.bukkit.block.structure.StructureRotation rotation, @NotNull @NotNull org.bukkit.block.structure.Mirror mirror, float integrity)
      Places this structure synchronously targeting regional thread execution requirements seamlessly.
      Parameters:
      origin - The target placement origin Location.
      rotation - The StructureRotation to apply.
      mirror - The Mirror transformation to apply.
      integrity - The survival chance [0.0 - 1.0] for each individual block.
    • place

      public void place(@NotNull @NotNull WorldGenAccess level, @NotNull @NotNull org.bukkit.Location origin, @NotNull @NotNull org.bukkit.block.structure.StructureRotation rotation, @NotNull @NotNull org.bukkit.block.structure.Mirror mirror, float integrity)
      Places this structure inside an asynchronous or virtual WorldGenAccess context. Handles deferring out-of-bounds placements back to regional scheduled executions explicitly ensuring safe completion.
      Parameters:
      level - The WorldGenAccess bridging chunk generation.
      origin - The target placement origin Location.
      rotation - The StructureRotation to apply.
      mirror - The Mirror transformation to apply.
      integrity - The survival chance [0.0 - 1.0] for each individual block.
    • addProcessor

      public void addProcessor(StructureProcessor processor)
      Appends a StructureProcessor to the placement pipeline.
      Parameters:
      processor - The StructureProcessor to add.