Files
minecraft-bedrock-json-schemas/source/behavior/animations/animations.json

109 lines
4.5 KiB
JSON
Raw Normal View History

2021-06-06 10:07:19 +00:00
{
2021-11-20 11:26:35 +01:00
"$schema": "http://json-schema.org/draft-07/schema",
2021-06-06 10:07:19 +00:00
"$id": "blockception.minecraft.behavior.animations",
2024-04-29 20:24:55 +07:00
"defaultSnippets": [
{
"label": "New animation",
"body": {
"format_version": "${1:1.10.0}",
"animations": {
"animation.${2:${TM_FILENAME/[\\.].*//}}": "^{$3}"
}
}
}
],
"examples": [{ "format_version": "1.10.0", "animations": { "animation.example": {} } }],
2021-11-16 13:19:45 +01:00
"definitions": {
"animationspec": {
"anyOf": [
2022-07-22 19:41:04 +02:00
{ "title": "Animation Specification", "description": "A single string that specifies which animation there are.", "type": "string" },
2021-11-16 13:19:45 +01:00
{
"type": "object",
"title": "Animation Specification",
2022-07-22 19:41:04 +02:00
"description": "A object specification on how to transition.",
2021-11-16 13:19:45 +01:00
"maxProperties": 1,
"minProperties": 1,
2021-11-16 13:21:53 +01:00
"additionalProperties": { "$ref": "../../molang/string.json" }
2021-11-16 13:19:45 +01:00
}
]
},
"particle_effect_spec": {
"additionalProperties": false,
"type": "object",
"required": ["effect"],
"properties": {
"bind_to_actor": {
"title": "Bind To Actor",
"type": "boolean",
"description": "Set to false to have the effect spawned in the world without being bound to an actor (by default an effect is bound to the actor).",
"const": false
},
2022-07-22 19:41:04 +02:00
"effect": { "type": "string", "description": "The name of a particle effect that should be played.", "title": "Effect" },
"locator": { "type": "string", "description": "The name of a locator on the actor where the effect should be located.", "title": "Locator" },
2021-11-16 13:19:45 +01:00
"pre_effect_script": {
"type": "string",
2022-07-22 19:41:04 +02:00
"description": "A molang script that will be run when the particle emitter is initialized.",
2021-11-16 13:19:45 +01:00
"title": "Pre Effect Script"
}
}
},
"commands": {
"type": "string",
2022-07-22 19:41:04 +02:00
"description": "The event or commands to execute.",
2021-11-16 13:19:45 +01:00
"title": "Commands",
"anyOf": [
2022-07-22 19:41:04 +02:00
{ "pattern": "^.*=.*;$", "title": "Variable", "description": "Sets the value to a molang variable." },
{ "pattern": "^/[a-z].*$", "title": "Minecraft Command", "description": "Executes a minecraft command." },
2021-11-16 13:19:45 +01:00
{ "pattern": "[A-Za-z][a-z]*\\.[a-z_0-9]*", "title": "Molang" },
2022-07-22 19:41:04 +02:00
{ "pattern": "^@s .*$", "title": "Event", "description": "An event to be called upon within the executing entity." }
2021-11-16 13:19:45 +01:00
]
}
},
"type": "object",
"title": "Animation",
2022-07-22 19:41:04 +02:00
"description": "Animation for behavior for.",
2021-11-16 13:19:45 +01:00
"required": ["format_version", "animations"],
"additionalProperties": false,
"properties": {
"format_version": { "type": "string", "enum": ["1.8.0", "1.10.0"] },
2021-11-16 13:19:45 +01:00
"animations": {
"title": "Animations Schema",
2022-07-22 19:41:04 +02:00
"description": "The animation specification.",
2021-11-16 13:19:45 +01:00
"type": "object",
"propertyNames": { "pattern": "^animation\\.[a-z\\.]+" },
"additionalProperties": {
"title": "Animation",
"type": "object",
2022-07-22 19:41:04 +02:00
"description": "A single animation definition for.",
2021-11-16 13:19:45 +01:00
"additionalProperties": false,
"propertyNames": { "examples": ["animation.example.foo"] },
"properties": {
2022-07-22 19:41:04 +02:00
"animation_length": { "type": "number", "description": "The time in seconds this animation will last.", "title": "Animation Length" },
2021-11-16 13:19:45 +01:00
"loop": {
"type": "boolean",
2022-07-22 19:41:04 +02:00
"description": "Whenever this animation should loop once it reaches the end, will only happen if the animation is still active.",
2021-11-16 13:19:45 +01:00
"title": "Loop"
},
"timeline": {
"title": "Timeline",
2022-07-22 19:41:04 +02:00
"description": "A timeline specification, property names are timestamps.",
2021-11-16 13:19:45 +01:00
"type": "object",
"propertyNames": { "pattern": "^(\\d+\\.\\d+|\\d+)$", "examples": ["0.0", "1.0"] },
"additionalProperties": {
"oneOf": [
{ "type": "string", "$ref": "#/definitions/commands" },
{ "type": "array", "title": "Collection Timelime Items", "items": { "$ref": "#/definitions/commands" } }
]
}
2024-03-27 12:34:57 +05:00
},
"anim_time_update": {
"title": "Animation Time Update",
"description": "How does time pass when playing the animation. Defaults to `query.anim_time + query.delta_time` which means advance in seconds.",
"$ref": "../../molang/number.json"
2021-11-16 13:19:45 +01:00
}
}
}
}
}
2021-06-06 10:07:19 +00:00
}