Skip to content

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 ​

ParameterTypeDescription
idnumber-
damagenumber-
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.durablenumber[]Numeric IDs whose damage value is durability.
data.fallbacksRecord<string, string>Items for unlisted damage values of a variant ID, where they differ from damage 0.
data.format"data-fixer-legacy-items"-
data.itemsRecord<string, string>Item IDs by numeric ID, or by id:damage for variants.
data.potionsRecord<string, string>-
data.spawnEggsRecord<string, string>-
data.variantsnumber[]Numeric IDs whose damage value selects a variant.

Returns ​

LegacyItem | undefined