Support single values for item components (#268)

This commit is contained in:
QuazChick
2024-05-11 10:24:22 +01:00
committed by GitHub
parent ffdf30a42d
commit 0ed8493085
12 changed files with 225 additions and 100 deletions

View File

@@ -1,21 +1,25 @@
{
"$id": "blockception.minecraft.behavior.items.minecraft:use_animation",
"additionalProperties": false,
"required": [ "value" ],
"type": "object",
"title": "Use Animation",
"description": "This component determines which animation plays when using the item.",
"properties": {
"value": {
"title": "Value",
"description": "Which animation to play when using the item.",
"enum": [
"bow",
"eat",
"crossbow",
"drink",
"camera"
]
}
"$id": "blockception.minecraft.behavior.items.minecraft:use_animation",
"title": "Use Animation",
"description": "This component determines which animation plays when using the item.",
"definitions": {
"animation": {
"enum": ["bow", "brush", "camera", "crossbow", "drink", "eat", "none", "spear", "spyglass"]
}
},
"oneOf": [
{ "$ref": "#/definitions/animation" },
{
"type": "object",
"additionalProperties": false,
"required": ["value"],
"properties": {
"value": {
"title": "Value",
"description": "Which animation to play when using the item.",
"$ref": "#/definitions/animation"
}
}
}
]
}