Function: resolveLegacyItemStack()
ts
function resolveLegacyItemStack(
id,
damage,
data
): LegacyItem | undefined;Defined in: packages/minerender/src/model/LegacyItems.ts:21
Resolves a numeric item using a previously loaded legacyItems dataset.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | number | - |
damage | number | - |
data | { durable: number[]; fallbacks: Record<string, string>; format: "data-fixer-legacy-items"; items: Record<string, string>; potions: Record<string, string>; spawnEggs: Record<string, string>; variants: number[]; } | - |
data.durable | number[] | Numeric IDs whose damage value is durability. |
data.fallbacks | Record<string, string> | Items for unlisted damage values of a variant ID, where they differ from damage 0. |
data.format | "data-fixer-legacy-items" | - |
data.items | Record<string, string> | Item IDs by numeric ID, or by id:damage for variants. |
data.potions | Record<string, string> | - |
data.spawnEggs | Record<string, string> | - |
data.variants | number[] | Numeric IDs whose damage value selects a variant. |
Returns
LegacyItem | undefined