From b70c469ecd8645d5eddd6d795d49ea53bcd614e5 Mon Sep 17 00:00:00 2001 From: Lars Martens Date: Sat, 28 Oct 2017 18:10:31 +0200 Subject: [PATCH] Increased character limit for command block hint Starting with Minecraft Version 1.11 --- index.htm | 2 +- js/main.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.htm b/index.htm index ab96bdd..4b103b6 100644 --- a/index.htm +++ b/index.htm @@ -236,7 +236,7 @@
- If your command is longer than 100 characters, it needs to be executed with a command block. Obtain one by typing: + If your command is longer than 256 characters (100 before Minecraft 1.11), it needs to be executed with a command block. Obtain one by typing:
/give @p command_block diff --git a/js/main.js b/js/main.js index 76842cf..3b932ae 100644 --- a/js/main.js +++ b/js/main.js @@ -409,7 +409,9 @@ function updateUI(){ // Generate code $("#code").text(generateCode()); - if(generateCode().length > 100){ + // Show hint, when command is too long + let characterLimit = (mcVersion == "1.8" || mcVersion == "1.9") ? 100 : 256; + if(generateCode().length > characterLimit){ $("#codeinfo").slideDown(); } else{