Hi! Can anyone help me with NBT ? suppose $bytearray is an instance of the https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/nbt/tag/ByteArrayTag.php class. PHP: $bytearray->getValue(); returns a string. but the problem is: i don't understand what this string is. Can someone help me pls? i really want to know what this string is and how to read it. i'm thinking to read it using the Binary class... if right can someone make me an example or link me where is this tag used in the pocketmine code? please don't answer:- "the string is an array of bytes"
I don't know it exactly but $this->value = $nbt->get($nbt->getInt()); Looks like it's an int?! And if you want to read it, you should know what it's for
i found an example here: https://github.com/sk89q/WorldEdit/...orldedit/schematic/MCEditSchematicFormat.java And i'm reading the string with: PHP: // \pocketmine\utils\Binary::readByte()// $n is the byte indexpublic static function readByte($c, $n = 0){ $b = ord($c{$n}); if (PHP_INT_SIZE === 8) return $b << 56 >> 56; else return $b << 24 >> 24;}
If someone need to paste a schematic i made a simple plugin: https://github.com/svilex/Schematic_Loader