@pumpkin-plugins/bedrock-addon-manager API / packs/addon / readAddon
Function: readAddon()
readAddon(
zip,maxBytes?):AddonContents
Defined in: packages/bedrock-addon-manager/src/packs/addon.ts:45
Finds the resource packs in a .mcaddon bundle. Bundles come in two layouts, folders with a manifest each or nested .mcpack archives, and often hold a behavior pack beside the resource pack. Behavior packs can't be offered to Bedrock clients, so they are skipped.
Parameters
zip
Uint8Array
The bytes of the bundle.
maxBytes?
number = MAX_ADDON_BYTES
Most bytes the bundle's files may add up to once unpacked.
Returns
The resource packs, repackaged as .mcpack archives, and the packs that were skipped.
Throws
When the bundle isn't a zip archive or unpacks to more than maxBytes.