import type { JsonPaletteRef } from 'sandstone/arguments/generated/_json/assets/atlas.ts' import type { JsonRegistry } from 'sandstone/arguments/generated/_json/registry.ts' import type { JSONRGB } from 'sandstone/arguments/generated/_json/util/color.ts' import type { JsonNBTObject } from 'sandstone/arguments/nbt.ts' import type { NamespacedString, TrimMaterialClass, TrimPatternClass } from 'sandstone' export type JsonDyeable = { /** * 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?: JSONRGB, } export type JsonEquipment = { /** * List of layers for each model layer type. */ layers: JsonLayers, /** * Replaces trim texture based on armor trim. \ * Only the first entry that matches is applied. */ trim_overrides?: Array, } export type JsonLayer = ({ /** * 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?: JsonDyeable, }) export type JsonLayers = { 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 JsonTrimOverride = { when: { pattern?: (JsonRegistry['minecraft:trim_pattern'] | TrimPatternClass), material?: (JsonRegistry['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?: JsonPaletteRef, } export type JsonTrimPredicate = { pattern?: (JsonRegistry['minecraft:trim_pattern'] | TrimPatternClass), material?: (JsonRegistry['minecraft:trim_material'] | TrimMaterialClass), } export type JsonWingsLayer = (JsonLayer & { /** * Whether this layer texture should be overridden by the player's custom elytra texture. \ * Defaults to `false`. */ use_player_texture?: boolean, })