|
PocketMine-MP 5.36.1 git-eaa7c4834c8fe2f379d24e7f0ee6cc63cfb18ccc
|
Inheritance diagram for pocketmine\resourcepacks\ResourcePack:
Collaboration diagram for pocketmine\resourcepacks\ResourcePack:Public Member Functions | |
| getPackChunk (int $start, int $length) | |
| getPackId () | |
| getPackName () | |
| getPackSize () | |
| getPackVersion () | |
| getSha256 () | |
Definition at line 26 of file ResourcePack.php.
| pocketmine\resourcepacks\ResourcePack::getPackChunk | ( | int | $start, |
| int | $length ) |
Returns a chunk of the resource pack zip as a byte-array for sending to clients.
Note that resource packs must always be in zip archive format for sending. A folder resource loader may need to perform on-the-fly compression for this purpose.
| int | $start | Offset to start reading the chunk from |
| int | $length | Maximum length of data to return. |
@phpstan-param positive-int $length
InvalidArgumentException if the chunk does not exist
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
| pocketmine\resourcepacks\ResourcePack::getPackId | ( | ) |
Returns the pack's UUID as a human-readable string
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
Referenced by pocketmine\event\player\PlayerResourcePackOfferEvent\addResourcePack().
Here is the caller graph for this function:| pocketmine\resourcepacks\ResourcePack::getPackName | ( | ) |
Returns the human-readable name of the resource pack
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
| pocketmine\resourcepacks\ResourcePack::getPackSize | ( | ) |
Returns the size of the pack on disk in bytes.
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
| pocketmine\resourcepacks\ResourcePack::getPackVersion | ( | ) |
Returns a version number for the pack in the format major.minor.patch
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
| pocketmine\resourcepacks\ResourcePack::getSha256 | ( | ) |
Returns the raw SHA256 sum of the compressed resource pack zip. This is used by clients to validate pack downloads.