From eb1fcac850a11113770fced3746e5411128809fa Mon Sep 17 00:00:00 2001 From: thelennylord <32369619+thelennylord@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:24:16 +0530 Subject: [PATCH 1/2] Fix give code option in equipment not working Fixes #29 --- js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index be30165..c91ec1d 100644 --- a/js/main.js +++ b/js/main.js @@ -760,7 +760,7 @@ function getHeadItem(){ if (mcVersion == "1.8" || mcVersion == "1.10" || mcVersion == "1.11") { return '{id:"skull",Count:1b,Damage:3b,tag:{'+parsed+'}}'; - } else if (mcVersion == "1.13") { + } else { return '{id:"player_head",Count:1b,tag:{'+parsed+'}}'; } } @@ -771,7 +771,7 @@ function getHeadItem(){ skullOwnerRaw = skullOwnerRaw.substring(0, skullOwnerRaw.indexOf("}")); if (mcVersion == "1.8" || mcVersion == "1.10" || mcVersion == "1.11") { return '{id:"skull",Count:1b,Damage:3b,tag:{'+skullOwnerRaw+'}}'; - } else if (mcVersion == "1.13") { + } else { return '{id:"player_head",Count:1b,tag:{'+skullOwnerRaw+'}}'; } } @@ -1150,4 +1150,4 @@ function deleteSave(data) { localStorage.removeItem(data); loadScreen(); alert(`${data} has been deleted!`); -}; \ No newline at end of file +}; From 24f1f7eafa89fc7ce16d08d145de33dd61f6a618 Mon Sep 17 00:00:00 2001 From: thelennylord <32369619+thelennylord@users.noreply.github.com> Date: Fri, 30 Oct 2020 01:28:33 +0530 Subject: [PATCH 2/2] Fix the remaining options in equipment --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index c91ec1d..9b73960 100644 --- a/js/main.js +++ b/js/main.js @@ -718,7 +718,7 @@ function getHeadItem(){ else if(equipCustomHeadMode == "player"){ if (mcVersion == "1.8" || mcVersion == "1.10" || mcVersion == "1.11") { return "{id:\"skull\",Count:1b,Damage:3b,tag:{SkullOwner:\""+equipHelmet+"\"}}"; - } else if (mcVersion == "1.13") { + } else { return "{id:\"player_head\",Count:1b,tag:{SkullOwner:\""+equipHelmet+"\"}}"; } } @@ -731,7 +731,7 @@ function getHeadItem(){ if (mcVersion == "1.8" || mcVersion == "1.10" || mcVersion == "1.11") { return '{id:"skull",Count:1b,Damage:3b,tag:{SkullOwner:{Id:'+uuid+',Properties:{textures:[{Value:'+base64Value+'}]}}}}'; - } else if (mcVersion == "1.13") { + } else { return '{id:"player_head",Count:1b,tag:{SkullOwner:{Id:'+uuid+',Properties:{textures:[{Value:'+base64Value+'}]}}}}'; } }