From 1e2d8723769d869f971e3750495cd2f6651e6a9a Mon Sep 17 00:00:00 2001 From: Misode Date: Fri, 4 Oct 2019 20:58:48 +0200 Subject: [PATCH] Hide table type dropdown for 1.13 + fix apply bonus formula translation --- index.html | 11 ++--------- schemas/1.14.json | 2 +- view.js | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 7432268d..226ca6cb 100644 --- a/index.html +++ b/index.html @@ -34,17 +34,10 @@
-
+
- +
diff --git a/schemas/1.14.json b/schemas/1.14.json index 245cad8e..a0cc377b 100644 --- a/schemas/1.14.json +++ b/schemas/1.14.json @@ -321,7 +321,7 @@ "id": "formula", "type": "enum", "translate": "$function.formula", - "translateValues": "$function.$formula", + "translateValue": "$function.$formula", "default": "minecraft:uniform_bonus_count", "values": [ "minecraft:uniform_bonus_count", diff --git a/view.js b/view.js index d7b275a3..6ada525f 100644 --- a/view.js +++ b/view.js @@ -39,10 +39,21 @@ function updateView() { function generateTable() { $('#structure').removeClass('d-none').html(''); - if (!table.type) { - table.type = 'minecraft:empty'; + let type = structure.fields.find(e => e.id === 'type'); + if (type) { + $('.table-type').removeClass('d-none'); + if (!table.type) { + table.type = type.default; + } + $('#tableType').html(''); + for (let option of type.values) { + $('#tableType').append(setValueAndName($('