From 4797b5a863908e6c50311e538eb557a99c367b42 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Mon, 11 Oct 2021 16:39:22 +0200 Subject: [PATCH] Adding examples --- source/behavior/entities/filters/filters.json | 2 +- source/behavior/entities/filters/filters/clock_time.json | 3 ++- .../filters/filters/distance_to_nearest_player.json | 1 + source/behavior/entities/format/types/trigger.json | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/behavior/entities/filters/filters.json b/source/behavior/entities/filters/filters.json index 44e02217..41b45b64 100644 --- a/source/behavior/entities/filters/filters.json +++ b/source/behavior/entities/filters/filters.json @@ -4,7 +4,7 @@ "$ref": "#/definitions/groups_spec", "definitions": { "filters_spec": { - "examples": [{ "all_of": [{}] }, { "any_of": [{}] }, { "none_of": [{}] }, { "test": "is_variant", "subject": "self", "value": 0 }], + "examples": [{ "all_of": [{}] }, { "any_of": [{}] }, { "none_of": [{}] }], "oneOf": [ { "propertyNames": { "enum": ["all_of", "any_of", "none_of"] }, diff --git a/source/behavior/entities/filters/filters/clock_time.json b/source/behavior/entities/filters/filters/clock_time.json index 9609609b..a6a8e1a2 100644 --- a/source/behavior/entities/filters/filters/clock_time.json +++ b/source/behavior/entities/filters/filters/clock_time.json @@ -4,6 +4,7 @@ "title": "Clock Time", "description": "Compares the current time with a float value in the range (0.0, 1.0).\n0.0= Noon\n0.25= Sunset\n0.5= Midnight\n0.75= Sunrise", "required": ["value"], + "examples": [{ "test": "clock_time", "value": 0.25 }], "properties": { "test": { "type": "string", @@ -25,7 +26,7 @@ "value": { "type": "number", "minimum": 0, - "maximum": 240000, + "maximum": 24000, "description": "(Required) A floating point value.", "title": "Value", "examples": [0, 0.025, 0.5, 0.75, 1] diff --git a/source/behavior/entities/filters/filters/distance_to_nearest_player.json b/source/behavior/entities/filters/filters/distance_to_nearest_player.json index e2d95a06..a00f9547 100644 --- a/source/behavior/entities/filters/filters/distance_to_nearest_player.json +++ b/source/behavior/entities/filters/filters/distance_to_nearest_player.json @@ -4,6 +4,7 @@ "title": "Distance To Nearest Player", "description": "Compares the distance to the nearest Player with a float value.", "required": ["value"], + "examples": [{ "test": "distance_to_nearest_player", "value": 5.7 }], "properties": { "test": { "type": "string", "title": "Test Property", "description": "Compares the distance to the nearest Player with a float value." }, "operator": { "$ref": "./types/operator.json" }, diff --git a/source/behavior/entities/format/types/trigger.json b/source/behavior/entities/format/types/trigger.json index 489e0abd..60341679 100644 --- a/source/behavior/entities/format/types/trigger.json +++ b/source/behavior/entities/format/types/trigger.json @@ -2,6 +2,13 @@ "$id": "blockception.minecraft.behavior.entities.type.trigger", "title": "Trigger", "description": "Trigger to fire", + "examples": [ + { + "filters": [], + "target": "self", + "event": "to:foo" + } + ], "oneOf": [ { "type": "string" }, {