UNPKG

@xmcl/resourcepack

Version:
40 lines 1.56 kB
/** * The resource pack module to read Minecraft resource pack just like Minecraft in-game. * * You can open the ResourcePack by {@link ResourcePack.open} and get resource by {@link ResourcePack.get}. * * Or you can just load resource pack metadata by {@link readPackMetaAndIcon}. * * @packageDocumentation * @module @xmcl/resourcepack */ import { FileSystem } from '@xmcl/system'; import { PackMeta } from './format'; export * from './resourceManager'; export * from './resourcePack'; export * from './modelLoader'; export * from './format'; /** * Read the resource pack metadata from zip file or directory. * * If you have already read the data of the zip file, you can pass it as the second parameter. The second parameter will be ignored on reading directory. * * @param resourcePack The absolute path of the resource pack file, or a buffer, or a opened resource pack. */ export declare function readPackMeta(resourcePack: string | Uint8Array | FileSystem): Promise<PackMeta.Pack>; /** * Read the resource pack icon png binary. * @param resourcePack The absolute path of the resource pack file, or a buffer, or a opened resource pack. */ export declare function readIcon(resourcePack: string | Uint8Array | FileSystem): Promise<Uint8Array>; /** * Read both metadata and icon * * @see {@link readIcon} * @see {@link readPackMeta} */ export declare function readPackMetaAndIcon(resourcePack: string | Uint8Array | FileSystem): Promise<{ metadata: PackMeta.Pack; icon: Uint8Array | undefined; }>; //# sourceMappingURL=index.d.ts.map