Class SNBTParser

java.lang.Object
de.pauleff.formats.snbt.SNBTParser

public class SNBTParser extends Object
Parser for SNBT (Stringified NBT) format. Converts SNBT strings into NBT tag structures using recursive descent parsing.

Supports all SNBT syntax including: - Basic types with suffixes (42b, 1.5f, etc.) - Strings (quoted and unquoted) - Compounds {key: value} - Lists [value1, value2] - Arrays [B; 1b, 2b] [I; 1, 2] [L; 1l, 2l]

  • Constructor Details

    • SNBTParser

      public SNBTParser(String input)
      Creates a parser for the given SNBT input string.
      Parameters:
      input - the SNBT string to parse
  • Method Details

    • parse

      public ITag<?> parse() throws SNBTException
      Parses the complete SNBT string into an NBT tag. The root element can be a compound, list, or primitive value.
      Returns:
      the parsed NBT tag
      Throws:
      SNBTException - if parsing fails due to syntax errors