PHP Class pocketmine\nbt\NBT

Show file Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$buffer
$endianness

Public Methods

Method Description
__construct ( $endianness = self::LITTLE_ENDIAN )
combineCompoundTags ( CompoundTag $tag1, CompoundTag $tag2, boolean $override = false ) : CompoundTag
feof ( )
fromArrayGuesser ( $key, $value )
get ( $len )
getArray ( )
getByte ( )
getData ( ) : CompoundTag | array
getDouble ( )
getFloat ( )
getInt ( )
getItemHelper ( CompoundTag $tag ) : Item
getLong ( )
getShort ( )
getString ( )
matchList ( ListTag $tag1, ListTag $tag2 )
matchTree ( CompoundTag $tag1, CompoundTag $tag2 )
parseJSON ( $data, &$offset )
put ( $v )
putByte ( $v )
putDouble ( $v )
putFloat ( $v )
putInt ( $v )
putItemHelper ( Item $item, integer $slot = null ) : CompoundTag
putLong ( $v )
putShort ( $v )
putString ( $v )
read ( $buffer, $doMultiple = false )
readCompressed ( $buffer, $compression = ZLIB_ENCODING_GZIP )
readTag ( )
setArray ( array $data, callable $guesser = null )
setData ( CompoundTag | array $data )
write ( ) : string | boolean
writeCompressed ( $compression = ZLIB_ENCODING_GZIP, $level = 7 )
writeTag ( Tag $tag )

Private Methods

Method Description
fromArray ( Tag $tag, array $data, callable $guesser )
parseCompound ( $str, &$offset )
parseList ( $str, &$offset )
readKey ( $data, &$offset )
readValue ( $data, &$offset, &$type = null )
toArray ( array &$data, Tag $tag )

Method Details

__construct() public method

public __construct ( $endianness = self::LITTLE_ENDIAN )

combineCompoundTags() public static method

public static combineCompoundTags ( CompoundTag $tag1, CompoundTag $tag2, boolean $override = false ) : CompoundTag
$tag1 pocketmine\nbt\tag\CompoundTag
$tag2 pocketmine\nbt\tag\CompoundTag
$override boolean
return pocketmine\nbt\tag\CompoundTag

feof() public method

public feof ( )

fromArrayGuesser() public static method

public static fromArrayGuesser ( $key, $value )

get() public method

public get ( $len )

getArray() public method

public getArray ( )

getByte() public method

public getByte ( )

getData() public method

public getData ( ) : CompoundTag | array
return pocketmine\nbt\tag\CompoundTag | array

getDouble() public method

public getDouble ( )

getFloat() public method

public getFloat ( )

getInt() public method

public getInt ( )

getItemHelper() public static method

public static getItemHelper ( CompoundTag $tag ) : Item
$tag pocketmine\nbt\tag\CompoundTag
return pocketmine\item\Item

getLong() public method

public getLong ( )

getShort() public method

public getShort ( )

getString() public method

public getString ( )

matchList() public static method

public static matchList ( ListTag $tag1, ListTag $tag2 )
$tag1 pocketmine\nbt\tag\ListTag
$tag2 pocketmine\nbt\tag\ListTag

matchTree() public static method

public static matchTree ( CompoundTag $tag1, CompoundTag $tag2 )
$tag1 pocketmine\nbt\tag\CompoundTag
$tag2 pocketmine\nbt\tag\CompoundTag

parseJSON() public static method

public static parseJSON ( $data, &$offset )

put() public method

public put ( $v )

putByte() public method

public putByte ( $v )

putDouble() public method

public putDouble ( $v )

putFloat() public method

public putFloat ( $v )

putInt() public method

public putInt ( $v )

putItemHelper() public static method

public static putItemHelper ( Item $item, integer $slot = null ) : CompoundTag
$item pocketmine\item\Item
$slot integer
return pocketmine\nbt\tag\CompoundTag

putLong() public method

public putLong ( $v )

putShort() public method

public putShort ( $v )

putString() public method

public putString ( $v )

read() public method

public read ( $buffer, $doMultiple = false )

readCompressed() public method

public readCompressed ( $buffer, $compression = ZLIB_ENCODING_GZIP )

readTag() public method

public readTag ( )

setArray() public method

public setArray ( array $data, callable $guesser = null )
$data array
$guesser callable

setData() public method

public setData ( CompoundTag | array $data )
$data pocketmine\nbt\tag\CompoundTag | array

write() public method

public write ( ) : string | boolean
return string | boolean

writeCompressed() public method

public writeCompressed ( $compression = ZLIB_ENCODING_GZIP, $level = 7 )

writeTag() public method

public writeTag ( Tag $tag )
$tag pocketmine\nbt\tag\Tag

Property Details

$buffer public property

public $buffer

$endianness public property

public $endianness