From a7fbac446a8b99267a781da69a90a42518fe5122 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Tue, 13 Apr 2021 16:50:12 +0200 Subject: [PATCH] Adding command regex patterns --- source/behavior/animations/1.10.0/animations.json | 10 +++++++++- source/behavior/animations/1.8.0/animations.json | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/source/behavior/animations/1.10.0/animations.json b/source/behavior/animations/1.10.0/animations.json index 3e43de6a..addbffb9 100644 --- a/source/behavior/animations/1.10.0/animations.json +++ b/source/behavior/animations/1.10.0/animations.json @@ -33,7 +33,15 @@ "pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" } } }, - "commands": { "type": "string", "description": "The event or commands to execute" } + "commands": { + "type": "string", + "description": "The event or commands to execute", + "anyOf": [ + { "pattern": "^.*=.*;$", "title": "Variable" }, + { "pattern": "^/[a-z].*$", "title": "Minecraft command" }, + { "pattern": "[A-Za-z][a-z]*\\.[a-z_0-9]*", "title": "Molang" } + ] + } }, "properties": { "format_version": { diff --git a/source/behavior/animations/1.8.0/animations.json b/source/behavior/animations/1.8.0/animations.json index f0e5d42f..6d2a9e44 100644 --- a/source/behavior/animations/1.8.0/animations.json +++ b/source/behavior/animations/1.8.0/animations.json @@ -29,7 +29,15 @@ "pre_effect_script": { "type": "string", "description": "A molang script that will be run when the particle emitter is initialized" } } }, - "commands": { "type": "string", "description": "The event or commands to execute" } + "commands": { + "type": "string", + "description": "The event or commands to execute", + "anyOf": [ + { "pattern": "^.*=.*;$", "title": "Variable" }, + { "pattern": "^/[a-z].*$", "title": "Minecraft command" }, + { "pattern": "[A-Za-z][a-z]*\\.[a-z_0-9]*", "title": "Molang" } + ] + } }, "type": "object", "title": "Animation 1.8.0",