mc-iexporter-iterator
v1.0.1
Published
Iterate icons exported with Icon Exporter MC mod
Downloads
5
Maintainers
Readme
mc-iexporter-iterator
Make generator that iterate over each item icon generated with IconExporter mod.
Since item names are serialized, and NBT data stored in separate files, additional parsing required. This what that lib does.
This lib used in E2E-E Icons and node-mc-gatherer.
Usage
import iconIterator from 'mc-iexporter-iterator'
for (const icon of iconIterator('x32')) {
console.log(`${icon.namespace}:${icon.name}:${icon.meta}`)
}
Api
Returned by generator object format:
interface ItemIcon {
/** Full path of file C:/Path/To/File.png */
filePath: string
/** Name of file without folder and extension `actuallyadditions__block_breaker__0` */
fileName: string
/** Source of item, mod id or 'fluid' */
namespace: string
/** Part of registry name after first : or fluid name */
name: string
/** Metadata of item or 0 */
meta: number
/** Hash code of sNbt if exists */
hash?: string
/** sNbt stored in separate file */
sNbt?: string
}