Fixing up some things
This commit is contained in:
89
resource/textures/ui_texture_definition.json
generated
89
resource/textures/ui_texture_definition.json
generated
@@ -1 +1,88 @@
|
|||||||
{"$schema":"http://json-schema.org/draft-07/schema","$id":"blockception.minecraft.resource.texture.ui_definition","additionalProperties":false,"description":"The file that specifies either 9slice texture or Aseprite flipbook.","title":"UI Texture File","type":"object","oneOf":[{"$ref":"#/definitions/A"},{"$ref":"#/definitions/B"}],"definitions":{"A":{"additionalProperties":false,"description":"The file that specifies 9Slice textures.","title":"9Slice Texture File","type":"object","properties":{"nineslice_size":{"title":"9Slice offsets","oneOf":[{"description":"Offset from left, top, right and bottom of the texture file.","type":"number","minimum":0},{"description":"Offsets from left, top, right and bottom of the texture file (in this exact order).","type":"array","minItems":4,"maxItems":4,"items":{"type":"number","minimum":0}}]},"base_size":{"title":"Size of the texture","description":"Width and height of the texture (in this exact order).","type":"array","minItems":2,"maxItems":2,"items":{"type":"number","minimum":0}}}},"B":{"additionalProperties":false,"description":"The file that specifies Aseprite/libresprite flipbook animation.","title":"Aseprite Flipbook File","type":"object","properties":{"meta":{"type":"object","description":"The meta data of the flipbook.","additionalProperties":true,"properties":{"size":{"type":"object","description":"The size of the flipbook sprite sheet.","properties":{"w":{"description":"The width of the sprite sheet.","type":"integer"},"h":{"description":"The height of the sprite sheet.","type":"integer"}},"required":["w","h"]},"image":{"description":"The path to the sprite sheet. The value is required, but not used.","type":"string"}},"required":["size","image"]},"frames":{"type":"array","description":"The frames of the flipbook.","items":{"type":"object","additionalProperties":true,"properties":{"duration":{"description":"The duration of the frame in milliseconds.","type":"integer","minimum":1},"frame":{"type":"object","description":"The position of the frame in the sprite sheet (UV).","properties":{"x":{"type":"integer","description":"The x position of the frame in the sprite sheet.","minimum":0},"y":{"type":"integer","description":"The y position of the frame in the sprite sheet.","minimum":0}},"required":["x","y"]}},"required":["duration","frame"]}}},"required":["meta","frames"]}}}
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
"$id": "blockception.minecraft.resource.texture.ui_definition",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "The file that specifies either 9slice texture or Aseprite flipbook.",
|
||||||
|
"title": "UI Texture File",
|
||||||
|
"type": "object",
|
||||||
|
"oneOf": [{ "$ref": "#/definitions/A" }, { "$ref": "#/definitions/B" }],
|
||||||
|
"definitions": {
|
||||||
|
"A": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "The file that specifies 9Slice textures.",
|
||||||
|
"title": "9Slice Texture File",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"nineslice_size": {
|
||||||
|
"title": "9Slice offsets",
|
||||||
|
"oneOf": [
|
||||||
|
{ "description": "Offset from left, top, right and bottom of the texture file.", "type": "number", "minimum": 0 },
|
||||||
|
{
|
||||||
|
"description": "Offsets from left, top, right and bottom of the texture file (in this exact order).",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 4,
|
||||||
|
"maxItems": 4,
|
||||||
|
"items": { "type": "number", "minimum": 0 }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"base_size": {
|
||||||
|
"title": "Size of the texture",
|
||||||
|
"description": "Width and height of the texture (in this exact order).",
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 2,
|
||||||
|
"maxItems": 2,
|
||||||
|
"items": { "type": "number", "minimum": 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"additionalProperties": false,
|
||||||
|
"description": "The file that specifies Aseprite/libresprite flipbook animation.",
|
||||||
|
"title": "Aseprite Flipbook File",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"meta": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The meta data of the flipbook.",
|
||||||
|
"additionalProperties": true,
|
||||||
|
"properties": {
|
||||||
|
"size": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The size of the flipbook sprite sheet.",
|
||||||
|
"properties": {
|
||||||
|
"w": { "description": "The width of the sprite sheet.", "type": "integer" },
|
||||||
|
"h": { "description": "The height of the sprite sheet.", "type": "integer" }
|
||||||
|
},
|
||||||
|
"required": ["w", "h"]
|
||||||
|
},
|
||||||
|
"image": { "description": "The path to the sprite sheet. The value is required, but not used.", "type": "string" }
|
||||||
|
},
|
||||||
|
"required": ["size", "image"]
|
||||||
|
},
|
||||||
|
"frames": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "The frames of the flipbook.",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true,
|
||||||
|
"properties": {
|
||||||
|
"duration": { "description": "The duration of the frame in milliseconds.", "type": "integer", "minimum": 1 },
|
||||||
|
"frame": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The position of the frame in the sprite sheet (UV).",
|
||||||
|
"properties": {
|
||||||
|
"x": { "type": "integer", "description": "The x position of the frame in the sprite sheet.", "minimum": 0 },
|
||||||
|
"y": { "type": "integer", "description": "The y position of the frame in the sprite sheet.", "minimum": 0 }
|
||||||
|
},
|
||||||
|
"required": ["x", "y"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["duration", "frame"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["meta", "frames"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -143,6 +143,19 @@
|
|||||||
{ "example:property": "one" },
|
{ "example:property": "one" },
|
||||||
{ "example:property": "math.random(0, 10)" }
|
{ "example:property": "math.random(0, 10)" }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"queue_command": {
|
||||||
|
"description": "Queues a command to be executed.",
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The command to execute.",
|
||||||
|
"examples": ["/say Hello World"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/resource/ui/_global_variables.json"
|
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/resource/ui/_global_variables.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileMatch": ["ui/*.{json,jsonc,json5}", "ui/**/*.{json,jsonc,json5}"],
|
"fileMatch": ["ui/*.{json,jsonc,json5}", "ui/**/*.{json,jsonc,json5}", "!ui/_ui_defs.{json,jsonc,json5}", "!ui/_global_variables.{json,jsonc,json5}"],
|
||||||
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/resource/ui/ui.json"
|
"url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/resource/ui/ui.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user