Class PreviewSnapshot.Builder

java.lang.Object
de.eldoria.schematicbrush.rendering.PreviewSnapshot.Builder
Enclosing class:
PreviewSnapshot

public static final class PreviewSnapshot.Builder extends Object
Collects the blocks of a snapshot.
  • Method Details

    • add

      public PreviewSnapshot.Builder add(int x, int y, int z, BlockData data)
      Adds a preview block. A block added twice keeps the last data.
      Parameters:
      x - x coordinate
      y - y coordinate
      z - z coordinate
      data - block data shown at this position
      Returns:
      this builder
    • build

      public PreviewSnapshot build()
      Builds the immutable snapshot.
      Returns:
      the snapshot, or PreviewSnapshot.empty() if no block was added