diff --git a/source/behavior/entities/filters/filters.json b/source/behavior/entities/filters/filters.json index 344a8417..f2fb06a6 100644 --- a/source/behavior/entities/filters/filters.json +++ b/source/behavior/entities/filters/filters.json @@ -81,10 +81,7 @@ }, "allOf": [ { "if": { "properties": { "test": { "const": "clock_time" } } }, "then": { "$ref": "./filters/clock_time.json" } }, - { - "if": { "properties": { "test": { "const": "distance_to_nearest_player" } } }, - "then": { "$ref": "./filters/distance_to_nearest_player.json" } - }, + { "if": { "properties": { "test": { "const": "distance_to_nearest_player" } } }, "then": { "$ref": "./filters/distance_to_nearest_player.json" } }, { "if": { "properties": { "test": { "const": "has_ability" } } }, "then": { "$ref": "./filters/has_ability.json" } }, { "if": { "properties": { "test": { "const": "has_biome_tag" } } }, "then": { "$ref": "./filters/has_biome_tag.json" } }, { "if": { "properties": { "test": { "const": "has_component" } } }, "then": { "$ref": "./filters/has_component.json" } }, @@ -92,6 +89,7 @@ { "if": { "properties": { "test": { "const": "has_damage" } } }, "then": { "$ref": "./filters/has_damage.json" } }, { "if": { "properties": { "test": { "const": "has_equipment" } } }, "then": { "$ref": "./filters/has_equipment.json" } }, { "if": { "properties": { "test": { "const": "has_mob_effect" } } }, "then": { "$ref": "./filters/has_mob_effect.json" } }, + { "if": { "properties": { "test": { "const": "has_nametag" } } }, "then": { "$ref": "./filters/has_nametag.json" } }, { "if": { "properties": { "test": { "const": "has_ranged_weapon" } } }, "then": { "$ref": "./filters/has_ranged_weapon.json" } }, { "if": { "properties": { "test": { "const": "has_tag" } } }, "then": { "$ref": "./filters/has_tag.json" } }, { "if": { "properties": { "test": { "const": "has_target" } } }, "then": { "$ref": "./filters/has_target.json" } }, diff --git a/source/behavior/entities/filters/filters/has_equipment.json b/source/behavior/entities/filters/filters/has_equipment.json index ff9be78f..0d5fa02f 100644 --- a/source/behavior/entities/filters/filters/has_equipment.json +++ b/source/behavior/entities/filters/filters/has_equipment.json @@ -3,9 +3,7 @@ "type": "object", "title": "Has Equipment", "description": "Tests for the presence of a named item in the designated slot of the subject entity.", - "required": [ - "value" - ], + "required": ["value"], "properties": { "test": { "type": "string", @@ -16,15 +14,7 @@ "domain": { "description": "The equipment location to test", "default": "any", - "enum": [ - "any", - "armor", - "feet", - "hand", - "head", - "leg", - "torso" - ], + "enum": ["any", "armor", "feet", "hand", "head", "leg", "torso"], "title": "Domain" }, "operator": { @@ -42,8 +32,8 @@ }, "examples": [ { - "test": "example", + "test": "has_equipment", "value": "example" } ] -} \ No newline at end of file +} diff --git a/source/behavior/entities/filters/filters/has_nametag.json b/source/behavior/entities/filters/filters/has_nametag.json new file mode 100644 index 00000000..181f5d68 --- /dev/null +++ b/source/behavior/entities/filters/filters/has_nametag.json @@ -0,0 +1,36 @@ +{ + "$id": "blockception.minecraft.behavior.entities.filters.has_nametag", + "type": "object", + "title": "Has Equipment", + "description": "Tests for the presence of a named item in the designated slot of the subject entity.", + "required": ["value"], + "properties": { + "test": { + "type": "string", + "const": "has_nametag", + "description": "Tests for the presence of a named item in the designated slot of the subject entity.", + "title": "Test" + }, + "domain": { + "description": "The equipment location to test", + "default": "any", + "enum": ["any", "armor", "feet", "hand", "head", "leg", "torso"], + "title": "Domain" + }, + "operator": { + "$ref": "./types/operator.json" + }, + "subject": { + "$ref": "./types/subject.json" + }, + "value": { + "description": "", + "type": "boolean", + "title": "Value" + } + }, + "examples": [ + { "test": "has_nametag", "value": false }, + { "test": "has_nametag", "value": true } + ] +}