1. Go to this page and download the library: Download rickselby/nbt library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
echo $tree->getName();
$type = $tree->getType();
// Value isn't set for Lists and Compounds; those nodes have children instead
$value = $tree->getValue();
$sectionsNode = $tree->findChildByName('Sections');
$node->setName('Name');
$node->setValue(123456);
// This is pretty useless on it's own really
$node = \Nbt\Tag::tagByte('aByte', 0x0f);
// You'll be building trees with Compounds and Lists mostly; both take an array of nodes as their values
$tree = \Nbt\Tag::tagCompound('aCompound', [
\Nbt\Tag::tagByte('aByte', 0x0f),
\Nbt\Tag::tagInt('aNumber', 12345),
]);
// Child tags for lists do not
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.