Class SNBTExample

java.lang.Object
de.pauleff.examples.SNBTExample

public class SNBTExample extends Object
Demonstrates SNBT (Stringified NBT) parsing and serialization capabilities. Shows conversion between NBT and human-readable string format for debugging and Minecraft commands.

Key concepts demonstrated:

  • SNBT parsing with type suffixes (b, s, l, f, d)
  • Smart string quoting and escape sequences
  • Array notation ([B;], [I;], [L;]) for typed arrays
  • Minecraft command NBT generation and parsing
  • SNBT serialization for Minecraft compatibility
  • Round-trip conversion verification
  • Position-aware error handling for debugging

SNBT format features:

  • Type suffixes - Explicit type control (42b, 3.14f, 1000l)
  • Smart quoting - Automatic quoting only when necessary
  • Unicode support - Full escape sequence handling
  • Arrays - Typed array notation compatible with Minecraft
Author:
Paul Ferlitz
  • Constructor Details

    • SNBTExample

      public SNBTExample()
  • Method Details