From 827e8be9f9a1400ccdb5ecb1d016e76a2943b530 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sat, 19 Jun 2021 15:03:18 +0200 Subject: [PATCH] Updated filters --- .../filters/filters/distance_to_nearest_player.json | 4 ++-- .../behavior/entities/filters/filters/has_component.json | 2 +- .../entities/filters/filters/has_container_open.json | 2 +- .../behavior/entities/filters/filters/has_equipment.json | 2 +- .../behavior/entities/filters/filters/has_mob_effect.json | 2 +- .../entities/filters/filters/hourly_clock_time.json | 8 +++++++- source/behavior/entities/filters/filters/in_block.json | 2 +- source/general/entity/damage_source.json | 5 ++++- 8 files changed, 18 insertions(+), 9 deletions(-) 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 f2a6b53e..e2d95a06 100644 --- a/source/behavior/entities/filters/filters/distance_to_nearest_player.json +++ b/source/behavior/entities/filters/filters/distance_to_nearest_player.json @@ -6,8 +6,8 @@ "required": ["value"], "properties": { "test": { "type": "string", "title": "Test Property", "description": "Compares the distance to the nearest Player with a float value." }, - "operator": { "$ref": "./types/operator.json", "description": "(Optional) The comparison to apply with `value`.", "title": "Operator" }, - "subject": { "$ref": "./types/subject.json", "description": "(Optional) The subject of this filter test.", "title": "Subject" }, + "operator": { "$ref": "./types/operator.json" }, + "subject": { "$ref": "./types/subject.json" }, "value": { "type": "number", "description": "(Required) A floating point value.", "title": "Value" } } } diff --git a/source/behavior/entities/filters/filters/has_component.json b/source/behavior/entities/filters/filters/has_component.json index 9b628d85..b4f78629 100644 --- a/source/behavior/entities/filters/filters/has_component.json +++ b/source/behavior/entities/filters/filters/has_component.json @@ -8,6 +8,6 @@ "test": { "type": "string", "title": "Test Property", "description": "Returns true when the subject entity contains the named component." }, "operator": { "$ref": "./types/operator.json" }, "subject": { "$ref": "./types/subject.json" }, - "value": { "type": "string", "description": "UNDOCUMENTATED: value", "title": "Value" } + "value": { "type": "string", "description": "(Required) The component name to look for", "title": "Value" } } } diff --git a/source/behavior/entities/filters/filters/has_container_open.json b/source/behavior/entities/filters/filters/has_container_open.json index 9a2c9b5a..57fdfee8 100644 --- a/source/behavior/entities/filters/filters/has_container_open.json +++ b/source/behavior/entities/filters/filters/has_container_open.json @@ -8,7 +8,7 @@ "operator": { "$ref": "./types/operator.json" }, "subject": { "$ref": "./types/subject.json" }, "value": { - "description": "True or false.", + "description": "(Optional) true or false.", "oneOf": [ { "type": "boolean", "default": true }, { "type": "string", "enum": ["true", "false"] } diff --git a/source/behavior/entities/filters/filters/has_equipment.json b/source/behavior/entities/filters/filters/has_equipment.json index 730b98d5..514f8b54 100644 --- a/source/behavior/entities/filters/filters/has_equipment.json +++ b/source/behavior/entities/filters/filters/has_equipment.json @@ -23,7 +23,7 @@ "description": "The item name to look for", "type": "string", "$ref": "../../../../general/item/identifier.json", - "title": "TODO Title" + "title": "Value" } } } diff --git a/source/behavior/entities/filters/filters/has_mob_effect.json b/source/behavior/entities/filters/filters/has_mob_effect.json index d493b270..e918ca55 100644 --- a/source/behavior/entities/filters/filters/has_mob_effect.json +++ b/source/behavior/entities/filters/filters/has_mob_effect.json @@ -8,6 +8,6 @@ "test": { "type": "string", "title": "Test Property", "description": "Tests whether the Subject has the specified mob effect." }, "operator": { "$ref": "./types/operator.json" }, "subject": { "$ref": "./types/subject.json" }, - "value": { "type": "string", "description": "UNDOCUMENTATED: value", "title": "Value" } + "value": { "type": "string", "description": "The specified mob effect", "title": "Value" } } } diff --git a/source/behavior/entities/filters/filters/hourly_clock_time.json b/source/behavior/entities/filters/filters/hourly_clock_time.json index 79be2aec..3c851c17 100644 --- a/source/behavior/entities/filters/filters/hourly_clock_time.json +++ b/source/behavior/entities/filters/filters/hourly_clock_time.json @@ -13,6 +13,12 @@ }, "operator": { "$ref": "./types/operator.json" }, "subject": { "$ref": "./types/subject.json" }, - "value": { "type": "integer", "description": "An integer value.", "minimum": 0, "maximum": 24000, "title": "Value" } + "value": { + "type": "integer", + "description": "(Required) An integer value set between 0 and 24000", + "minimum": 0, + "maximum": 24000, + "title": "Value" + } } } diff --git a/source/behavior/entities/filters/filters/in_block.json b/source/behavior/entities/filters/filters/in_block.json index 759af6d0..049809f5 100644 --- a/source/behavior/entities/filters/filters/in_block.json +++ b/source/behavior/entities/filters/filters/in_block.json @@ -1,7 +1,7 @@ { "$id": "blockception.minecraft.behavior.entities.filters.in_block", "type": "object", - "title": "In block", + "title": "In Block", "description": "Returns true when the subject entity is inside a specified Block type.", "properties": { "test": { diff --git a/source/general/entity/damage_source.json b/source/general/entity/damage_source.json index 89cf91eb..804f8ac5 100644 --- a/source/general/entity/damage_source.json +++ b/source/general/entity/damage_source.json @@ -5,6 +5,7 @@ "enum": [ "all", "anvil", + "attack", "block_explosion", "charging", "contact", @@ -12,8 +13,8 @@ "entity_attack", "entity_explosion", "fall", - "fatal", "falling_block", + "fatal", "fire", "fire_tick", "fireworks", @@ -27,6 +28,8 @@ "override", "piston", "projectile", + "stalactite", + "stalagmite", "starve", "suffocation", "suicide",