1 line
447 B
JavaScript
1 line
447 B
JavaScript
|
function buildJSON(e,t){const a={parent:"item/handheld"};a.textures={layer0:"item/"+e},a.overrides=[],a.overrides[0]={predicate:{damaged:0,damage:0},model:"item/"+e};for(let d=0;d<t.length;d++){const r=t[d],i=d+1/itemDamages[e];a.overrides[d+1]={predicate:{damaged:0,damage:i},model:r}}return a.overrides[t.length+1]={predicate:{damaged:1,damage:0},model:"item/"+e},JSON.stringify(a,null,2)}const itemDamages={leather_boots:64,netherite_hoe:2030};
|