diff --git a/1/1.21.json b/1/1.21.json index 8ff7c54..298ef63 100644 --- a/1/1.21.json +++ b/1/1.21.json @@ -384,16 +384,17 @@ "type": { "type": "string", "description": "The type of the setting", - "enum": ["boolean", "positive_integer", "string", "select", "color", "integer", "untranslated"], + "enum": ["boolean", "positive_integer", "string", "select", "color", "integer", "untranslated", "number"], "minLength": 1 }, "default": { - "type": ["boolean", "integer", "string"], + "type": ["boolean", "integer", "string", "number"], "description": "The default value of the setting." }, "potentialValues": {}, "min": {}, "max": {}, + "step": {}, "allowTransparency": {}, "if": { "$ref": "#/definitions/if" @@ -576,6 +577,52 @@ } } } + }, + { + "if": { + "properties": { + "type": { + "const": "number" + } + } + }, + "then": { + "properties": { + "default": { + "type": "number" + }, + "min": { + "type": "number", + "description": "The minimum value of the number." + }, + "max": { + "type": "number", + "description": "The maximum value of the number." + }, + "step": { + "type": ["number", "string"], + "description": "The step value of the number.", + "allOf": [ + { + "if": { + "type": "number" + }, + "then": { + "minimum": 0 + } + }, + { + "if": { + "type": "string" + }, + "then": { + "enum": ["any"] + } + } + ] + } + } + } } ], "required": ["name", "id", "type", "default"],