From 57d0cd3e9ca97d27e84a4b05c722f844fcae8988 Mon Sep 17 00:00:00 2001 From: Lars Martens Date: Wed, 23 Nov 2016 17:15:38 +0100 Subject: [PATCH] Support for custom name --- index.htm | 4 ++++ js/main.js | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/index.htm b/index.htm index 45d9a68..32baea3 100644 --- a/index.htm +++ b/index.htm @@ -130,6 +130,10 @@
+ + +
+
diff --git a/js/main.js b/js/main.js index 490ad55..57fc848 100644 --- a/js/main.js +++ b/js/main.js @@ -50,6 +50,9 @@ var equipColorLeggings; var equipColorChestplate; var equipColorHelmet; +var customName; +var showCustomName; + var useDisabledSlots; //The rotation values are all in degrees. @@ -279,6 +282,9 @@ function handleInput(){ equipColorChestplate = $("#chestplatecolor").css("background-color"); equipColorHelmet = $("#helmetcolor").css("background-color"); + customName = getInput("customname"); + showCustomName = getCheckBoxInput("showcustomname"); + useDisabledSlots = getCheckBoxInput("usedisabledslots"); @@ -414,6 +420,12 @@ function generateCode(){ tags.push("HandItems:["+hands.join(",")+"]"); } + // Custom name + if(customName != "" && customName != null) + tags.push("CustomName:\""+customName+"\""); + if(showCustomName) + tags.push("CustomNameVisible:1b"); + //DisabledSlots if(useDisabledSlots){ tags.push("DisabledSlots:"+calculateDisabledSlotsFlag());