Updated filters

This commit is contained in:
DaanV2
2021-06-19 15:03:18 +02:00
parent aba573ef3f
commit 827e8be9f9
8 changed files with 18 additions and 9 deletions

View File

@@ -6,8 +6,8 @@
"required": ["value"], "required": ["value"],
"properties": { "properties": {
"test": { "type": "string", "title": "Test Property", "description": "Compares the distance to the nearest Player with a float value." }, "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" }, "operator": { "$ref": "./types/operator.json" },
"subject": { "$ref": "./types/subject.json", "description": "(Optional) The subject of this filter test.", "title": "Subject" }, "subject": { "$ref": "./types/subject.json" },
"value": { "type": "number", "description": "(Required) A floating point value.", "title": "Value" } "value": { "type": "number", "description": "(Required) A floating point value.", "title": "Value" }
} }
} }

View File

@@ -8,6 +8,6 @@
"test": { "type": "string", "title": "Test Property", "description": "Returns true when the subject entity contains the named component." }, "test": { "type": "string", "title": "Test Property", "description": "Returns true when the subject entity contains the named component." },
"operator": { "$ref": "./types/operator.json" }, "operator": { "$ref": "./types/operator.json" },
"subject": { "$ref": "./types/subject.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" }
} }
} }

View File

@@ -8,7 +8,7 @@
"operator": { "$ref": "./types/operator.json" }, "operator": { "$ref": "./types/operator.json" },
"subject": { "$ref": "./types/subject.json" }, "subject": { "$ref": "./types/subject.json" },
"value": { "value": {
"description": "True or false.", "description": "(Optional) true or false.",
"oneOf": [ "oneOf": [
{ "type": "boolean", "default": true }, { "type": "boolean", "default": true },
{ "type": "string", "enum": ["true", "false"] } { "type": "string", "enum": ["true", "false"] }

View File

@@ -23,7 +23,7 @@
"description": "The item name to look for", "description": "The item name to look for",
"type": "string", "type": "string",
"$ref": "../../../../general/item/identifier.json", "$ref": "../../../../general/item/identifier.json",
"title": "TODO Title" "title": "Value"
} }
} }
} }

View File

@@ -8,6 +8,6 @@
"test": { "type": "string", "title": "Test Property", "description": "Tests whether the Subject has the specified mob effect." }, "test": { "type": "string", "title": "Test Property", "description": "Tests whether the Subject has the specified mob effect." },
"operator": { "$ref": "./types/operator.json" }, "operator": { "$ref": "./types/operator.json" },
"subject": { "$ref": "./types/subject.json" }, "subject": { "$ref": "./types/subject.json" },
"value": { "type": "string", "description": "UNDOCUMENTATED: value", "title": "Value" } "value": { "type": "string", "description": "The specified mob effect", "title": "Value" }
} }
} }

View File

@@ -13,6 +13,12 @@
}, },
"operator": { "$ref": "./types/operator.json" }, "operator": { "$ref": "./types/operator.json" },
"subject": { "$ref": "./types/subject.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"
}
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"$id": "blockception.minecraft.behavior.entities.filters.in_block", "$id": "blockception.minecraft.behavior.entities.filters.in_block",
"type": "object", "type": "object",
"title": "In block", "title": "In Block",
"description": "Returns true when the subject entity is inside a specified Block type.", "description": "Returns true when the subject entity is inside a specified Block type.",
"properties": { "properties": {
"test": { "test": {

View File

@@ -5,6 +5,7 @@
"enum": [ "enum": [
"all", "all",
"anvil", "anvil",
"attack",
"block_explosion", "block_explosion",
"charging", "charging",
"contact", "contact",
@@ -12,8 +13,8 @@
"entity_attack", "entity_attack",
"entity_explosion", "entity_explosion",
"fall", "fall",
"fatal",
"falling_block", "falling_block",
"fatal",
"fire", "fire",
"fire_tick", "fire_tick",
"fireworks", "fireworks",
@@ -27,6 +28,8 @@
"override", "override",
"piston", "piston",
"projectile", "projectile",
"stalactite",
"stalagmite",
"starve", "starve",
"suffocation", "suffocation",
"suicide", "suicide",