import type { PaletteRef } from 'sandstone/arguments/generated/assets/atlas.ts' import type { Registry } from 'sandstone/arguments/generated/registry.ts' import type { RGB } from 'sandstone/arguments/generated/util/color.ts' import type { NBTObject } from 'sandstone/arguments/nbt.ts' import type { NamespacedString, TrimMaterialClass, TrimPatternClass } from 'sandstone' export type Dyeable = { /** * If the item is not dyed, this color is used instead. \ * If not specified and the item is not dyed, this layer will be hidden. */ color_when_undyed?: RGB, } export type Equipment = { /** * List of layers for each model layer type. */ layers: Layers, /** * Replaces trim texture based on armor trim. \ * Only the first entry that matches is applied. */ trim_overrides?: Array, } export type Layer = ({ /** * Texture location for this layer, inside `entity/equipment//`. */ texture: T, } & { /** * If specified, this layer will be tinted by the color contained in the `dyed_color` component. */ dyeable?: Dyeable, }) export type Layers = { humanoid?: Array>, humanoid_leggings?: Array>, humanoid_baby?: Array>, wings?: Array>, wolf_body?: Array>, horse_body?: Array>, llama_body?: Array>, happy_ghast_body?: Array>, nautilus_saddle?: Array>, nautilus_body?: Array>, pig_saddle?: Array>, strider_saddle?: Array>, camel_husk_saddle?: Array>, camel_saddle?: Array>, horse_saddle?: Array>, donkey_saddle?: Array>, mule_saddle?: Array>, zombie_horse_saddle?: Array>, skeleton_horse_saddle?: Array>, } export type TrimOverride = { when: { pattern?: (Registry['minecraft:trim_pattern'] | TrimPatternClass), material?: (Registry['minecraft:trim_material'] | TrimMaterialClass), }, /** * When present, overrides the base texture provided by trim pattern. \ * The texture is located under `trims/entity//`. */ texture?: NamespacedString, /** * When present, overrides the palette texture provided by trim material. */ palette?: PaletteRef, } export type TrimPredicate = { pattern?: (Registry['minecraft:trim_pattern'] | TrimPatternClass), material?: (Registry['minecraft:trim_material'] | TrimMaterialClass), } export type WingsLayer = (Layer & { /** * Whether this layer texture should be overridden by the player's custom elytra texture. \ * Defaults to `false`. */ use_player_texture?: boolean, })