Class SchematicReader

java.lang.Object
dev.flavored.bamboo.SchematicReader

public class SchematicReader extends Object
A SchematicReader reads a Sponge (v1) schematic.
  • Constructor Details

    • SchematicReader

      public SchematicReader()
      Initializes a new schematic reader.
  • Method Details

    • fromPath

      @NotNull public @NotNull Schematic fromPath(@NotNull @NotNull Path path) throws IOException
      Reads a schematic from the given Path.
      Parameters:
      path - The path to the schematic file.
      Returns:
      The schematic.
      Throws:
      IOException - If the schematic could not be read or is invalid.
    • fromStream

      @NotNull public @NotNull Schematic fromStream(@NotNull @NotNull InputStream stream) throws IOException
      Reads a schematic from the given InputStream.
      Parameters:
      stream - The input stream.
      Returns:
      The schematic.
      Throws:
      IOException - If the schematic could not be read or is invalid.
    • fromNBT

      @NotNull public @NotNull Schematic fromNBT(@NotNull @NotNull net.kyori.adventure.nbt.CompoundBinaryTag root) throws IOException
      Reads a schematic from the given CompoundBinaryTag.
      Parameters:
      root - The root tag.
      Returns:
      The schematic.
      Throws:
      IOException - If the schematic is invalid.