Class SchematicSponge

java.lang.Object
net.sandrohc.schematic4j.schematic.SchematicSponge
All Implemented Interfaces:
Schematic

public class SchematicSponge extends Object implements Schematic
  • Constructor Details

  • Method Details

    • getFormat

      public SchematicFormat getFormat()
      Specified by:
      getFormat in interface Schematic
    • getWidth

      public int getWidth()
      Description copied from interface: Schematic
      The width of the schematic.
      Specified by:
      getWidth in interface Schematic
      Returns:
      the schematic width
    • getHeight

      public int getHeight()
      Description copied from interface: Schematic
      The height of the schematic.
      Specified by:
      getHeight in interface Schematic
      Returns:
      the schematic height
    • getLength

      public int getLength()
      Description copied from interface: Schematic
      The length of the schematic.
      Specified by:
      getLength in interface Schematic
      Returns:
      the schematic length
    • getOffset

      public int[] getOffset()
      Description copied from interface: Schematic
      The relative offset of the schematic.
      Specified by:
      getOffset in interface Schematic
      Returns:
      the schematic length
    • getBlock

      public SchematicBlock getBlock(int x, int y, int z)
      Description copied from interface: Schematic
      The block at the specified block.

      Depending on the schematic format, each coordinate can also be negative and is relative to the schematic origin.

      Specified by:
      getBlock in interface Schematic
      Parameters:
      x - The X coordinate, can be a negative value
      y - The X coordinate, can be a negative value
      z - The X coordinate, can be a negative value
      Returns:
      block, or null if information is not available.
    • getBlocks

      public BlockIterator getBlocks()
      Description copied from interface: Schematic
      Iterator for iterating over the list of blocks.
      Specified by:
      getBlocks in interface Schematic
      Returns:
      an iterator
    • getBlockEntities

      public Collection<SchematicBlockEntity> getBlockEntities()
      Description copied from interface: Schematic
      The list of tile/block entities.
      Specified by:
      getBlockEntities in interface Schematic
      Returns:
      list of block entities
    • getEntities

      public Collection<SchematicEntity> getEntities()
      Description copied from interface: Schematic
      The list of entities.
      Specified by:
      getEntities in interface Schematic
      Returns:
      list of entities
    • getBiome

      public SchematicBiome getBiome(int x, int z)
      Description copied from interface: Schematic
      The biome at the specified block.
      Specified by:
      getBiome in interface Schematic
      Parameters:
      x - the X coordinate
      z - the Z coordinate
      Returns:
      biome, or null if information is not available.
    • getBiomes

      public BiomeIterator getBiomes()
      Description copied from interface: Schematic
      Iterator for iterating over the list of biomes.
      Specified by:
      getBiomes in interface Schematic
      Returns:
      an iterator
    • getName

      public String getName()
      Description copied from interface: Schematic
      The name of the schematic.
      Specified by:
      getName in interface Schematic
      Returns:
      schematic name, or null if information is not available.
    • getAuthor

      public String getAuthor()
      Description copied from interface: Schematic
      The name of the author of the schematic.
      Specified by:
      getAuthor in interface Schematic
      Returns:
      author, or null if information is not available.
    • date

      public LocalDateTime date()
      Description copied from interface: Schematic
      The date that this schematic was created on.
      Specified by:
      date in interface Schematic
      Returns:
      creation date, or null if information is not available.
    • getDataVersion

      public int getDataVersion()
    • getMetadata

      public SchematicSponge.Metadata getMetadata()
    • toString

      public String toString()
      Overrides:
      toString in class Object