Interface INBTReader

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
NBTReader

public interface INBTReader extends AutoCloseable
Interface for reading NBT data from files with automatic format detection. Automatically detects and handles compression (GZIP, ZLIB, or uncompressed) and properly decodes the binary NBT format.
Author:
Paul Ferlitz
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this reader and releases any associated system resources.
    Reads and parses the entire NBT file into a compound tag structure.
  • Method Details

    • read

      ICompoundTag read() throws IOException
      Reads and parses the entire NBT file into a compound tag structure. The method automatically detects compression and handles all the binary format complexities. Since NBT files always have compound tags as roots in Java Edition, this returns an ICompoundTag.
      Returns:
      The root ICompoundTag containing the complete NBT structure
      Throws:
      IOException - If the file cannot be read, is corrupted, or uses an unsupported format
    • close

      void close() throws IOException
      Closes this reader and releases any associated system resources.
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException - If an error occurs during resource cleanup