diff --git a/js/model.js b/js/model.js index 0ff9e0da..c51e1559 100644 --- a/js/model.js +++ b/js/model.js @@ -372,6 +372,7 @@ function updateField(el) { for (let i = 0; i < value.length; i += 1) { value[i] = value[i].trim(); if (type === 'chance-list') { + value[i] = parseFloat(value[i]); if (isNaN(value[i])) { value = []; break; diff --git a/locales/en.json b/locales/en.json index eabe0bac..3dd2882d 100644 --- a/locales/en.json +++ b/locales/en.json @@ -393,6 +393,7 @@ "help.biome_source.type.checkerboard": "Biomes generating in a checkerboard chunk pattern", "help.biome_source.type.vanilla_layered": "Biome distribution for the overworld", "help.biome_source.type.the_end": "Biome distrubution for the end", + "help.condition.chances": "List of floats between 0 and 1 separated by commas", "help.condition.time_period": "If present, time will be modulo-divided by this value. For example, if set to 24000, value will operate on a time period of days.", "help.dimension": "The identifier used for \"/execute in\". Must be all lowercase.", "help.dimension.type.ultrawarm": "If true, water will evaporate and sponges will dry", diff --git a/schemas/1.14.json b/schemas/1.14.json index cb2576df..34c77b18 100644 --- a/schemas/1.14.json +++ b/schemas/1.14.json @@ -541,6 +541,7 @@ "id": "chances", "type": "chance-list", "translate": "condition.chances", + "help": true, "require": [ "minecraft:table_bonus" ] diff --git a/schemas/1.15.json b/schemas/1.15.json index ec0d98bd..43eb2741 100644 --- a/schemas/1.15.json +++ b/schemas/1.15.json @@ -733,6 +733,7 @@ "id": "chances", "type": "chance-list", "translate": "condition.chances", + "help": true, "require": [ "minecraft:table_bonus" ] diff --git a/schemas/1.16.json b/schemas/1.16.json index 74ee56c0..e3fb6423 100644 --- a/schemas/1.16.json +++ b/schemas/1.16.json @@ -733,6 +733,7 @@ "id": "chances", "type": "chance-list", "translate": "condition.chances", + "help": true, "require": [ "minecraft:table_bonus" ]