From 146c19211ce98797d79ae34c7bc8eaf07b94faab Mon Sep 17 00:00:00 2001 From: SBDeveloper Date: Mon, 15 Apr 2024 19:43:01 +0200 Subject: [PATCH] Limited damage to 6 decimals --- dist/js/calculator.js | 2 +- dist/js/calculator.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/js/calculator.js b/dist/js/calculator.js index d5c3e35..c7fc36f 100644 --- a/dist/js/calculator.js +++ b/dist/js/calculator.js @@ -60,7 +60,7 @@ function buildJSON(supportsCMD, item, namespace, models) { json['overrides'][i + 1] = { 'predicate': { 'damaged': 0, - 'damage': (i + 1) / (itemDamages[item] - 1) + 'damage': ((i + 1) / (itemDamages[item] - 1)).toFixed(6) }, 'model': namespace + 'item/' + models[i] }; diff --git a/dist/js/calculator.min.js b/dist/js/calculator.min.js index 764d59b..f18bf78 100644 --- a/dist/js/calculator.min.js +++ b/dist/js/calculator.min.js @@ -1 +1 @@ -const itemDamages={leather_helmet:55,leather_chestplate:80,leather_leggings:75,leather_boots:65,netherite_hoe:2031,diamond_axe:1561,diamond_hoe:1561,shears:238};function buildJSON(supportsCMD,item,namespace,models){namespace=namespace==="minecraft"?"":namespace+":";const json={};json["parent"]="item/handheld";json["textures"]={layer0:"item/"+item,layer1:"item/"+item+"_overlay"};json["overrides"]=[];if(supportsCMD){for(let i=0;i