JsonNbtParser
in package
Table of Contents
- parseJson() : CompoundTag
- Parses JSON-formatted NBT into a CompoundTag and returns it. Used for parsing tags supplied with the /give command.
- parseCompound() : CompoundTag
- parseList() : ListTag
- readBreak() : bool
- readKey() : string
- readValue() : Tag
- skipWhitespace() : bool
Methods
parseJson()
Parses JSON-formatted NBT into a CompoundTag and returns it. Used for parsing tags supplied with the /give command.
public
static parseJson(string $data) : CompoundTag
Parameters
- $data : string
Tags
Return values
CompoundTag —parseCompound()
private
static parseCompound(BinaryStream $stream) : CompoundTag
Parameters
- $stream : BinaryStream
Tags
Return values
CompoundTag —parseList()
private
static parseList(BinaryStream $stream) : ListTag
Parameters
- $stream : BinaryStream
Tags
Return values
ListTag —readBreak()
private
static readBreak(BinaryStream $stream, string $terminator) : bool
Parameters
- $stream : BinaryStream
- $terminator : string
Tags
Return values
bool —true if terminator has been found, false if comma was found
readKey()
private
static readKey(BinaryStream $stream) : string
Parameters
- $stream : BinaryStream
Tags
Return values
string —readValue()
private
static readValue(BinaryStream $stream) : Tag
Parameters
- $stream : BinaryStream
Tags
Return values
Tag —skipWhitespace()
private
static skipWhitespace(BinaryStream $stream, string $terminator) : bool
Parameters
- $stream : BinaryStream
- $terminator : string