Update entity_sensor's schema to 1.20.60 (#203)

* Update entity_sensor's schema to 1.20.60

* Add cooldown field
This commit is contained in:
Piotr Brzozowski
2023-12-16 16:26:36 +01:00
committed by GitHub
parent aae2584440
commit f87f305513

View File

@@ -1,8 +1,9 @@
{ {
"$id": "blockception.minecraft.behavior.entities.minecraft.entity_sensor", "$id": "blockception.minecraft.behavior.entities.minecraft.entity_sensor",
"definitions": {
"sensor_element": {
"type": "object", "type": "object",
"title": "Entity Sensor", "title": "Entity Sensor",
"description": "A component that fires an event when a set of conditions are met by other entities within the defined range.",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"maximum_count": { "maximum_count": {
@@ -17,12 +18,6 @@
"description": "The minimum number of entities that must pass the filter conditions for the event to send.", "description": "The minimum number of entities that must pass the filter conditions for the event to send.",
"title": "Minimum Count" "title": "Minimum Count"
}, },
"relative_range": {
"type": "boolean",
"default": true,
"description": "If true the sensor range is additive on top of the entity's size.",
"title": "Relative Range"
},
"require_all": { "require_all": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
@@ -42,16 +37,63 @@
"title": "Event", "title": "Event",
"description": "event.", "description": "event.",
"type": "string" "type": "string"
},
"cooldown": {
"title": "Cooldown",
"description": "How many seconds should elapse before the subsensor can once again sense for entities. The cooldown is applied on top of the base 1 tick (0.05 seconds) delay. Negative values will result in no cooldown being used.",
"type": "number",
"default": -1
} }
}, },
"examples": [ "examples": [
{ {
"maximum_count": -1, "maximum_count": -1,
"minimum_count": 1, "minimum_count": 1,
"relative_range": true,
"require_all": false, "require_all": false,
"sensor_range": 10, "sensor_range": 10,
"event": "example" "event": "example"
} }
] ]
}
},
"type": "object",
"title": "Entity Sensor",
"description": "A component that fires an event when a set of conditions are met by other entities within the defined range.",
"oneOf": [
{
"allOf": [
{
"$ref": "#/definitions/sensor_element"
},
{
"properties": {
"relative_range": {
"type": "boolean",
"default": true,
"description": "If true the sensor range is additive on top of the entity's size.",
"title": "Relative Range"
}
}
}
]
},
{
"properties": {
"subsensors": {
"type": "array",
"title": "Subsensors",
"description": "The list of subsensors.",
"items": {
"$ref": "#/definitions/sensor_element"
}
},
"relative_range": {
"type": "boolean",
"default": true,
"description": "If true the sensor range is additive on top of the entity's size.",
"title": "Relative Range"
}
}
}
]
} }