@minecraft/creator-tools
Version:
Minecraft Creator Tools command line and libraries.
24 lines (23 loc) • 897 B
TypeScript
/**
* Generate a recolored 16x16 RGBA pixel array from a template and a hex color.
*
* Shade levels map to color multipliers:
* 1 (dark) = color * 0.45
* 2 (mid/base) = color * 0.75
* 3 (highlight) = color * 1.0 + 40 brightness boost
*/
export declare function recolorTemplate(templateName: string, hexColor: string): {
pixels: Uint8Array;
width: number;
height: number;
} | undefined;
/**
* Get the template name for an item based on its traits.
* Returns undefined if no matching template exists.
*/
export declare function getTemplateForTraits(traits: string[]): string | undefined;
/**
* Generate a recolored item texture PNG from traits and a color.
* Returns PNG bytes, or undefined if no template matches or encoding fails.
*/
export declare function generateItemTextureFromTemplate(traits: string[], hexColor: string): Promise<Uint8Array | undefined>;