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:
@@ -1,57 +1,99 @@
|
|||||||
{
|
{
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.entity_sensor",
|
"$id": "blockception.minecraft.behavior.entities.minecraft.entity_sensor",
|
||||||
|
"definitions": {
|
||||||
|
"sensor_element": {
|
||||||
|
"type": "object",
|
||||||
|
"title": "Entity Sensor",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"maximum_count": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": -1,
|
||||||
|
"description": "The maximum number of entities that must pass the filter conditions for the event to send.",
|
||||||
|
"title": "Maximum Count"
|
||||||
|
},
|
||||||
|
"minimum_count": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1,
|
||||||
|
"description": "The minimum number of entities that must pass the filter conditions for the event to send.",
|
||||||
|
"title": "Minimum Count"
|
||||||
|
},
|
||||||
|
"require_all": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "If true requires all nearby entities to pass the filter conditions for the event to send.",
|
||||||
|
"title": "Require All"
|
||||||
|
},
|
||||||
|
"sensor_range": {
|
||||||
|
"type": "number",
|
||||||
|
"default": 10,
|
||||||
|
"description": "The maximum distance another entity can be from this and have the filters checked against it.",
|
||||||
|
"title": "Sensor Range"
|
||||||
|
},
|
||||||
|
"event_filters": {
|
||||||
|
"$ref": "../../filters/filters.json"
|
||||||
|
},
|
||||||
|
"event": {
|
||||||
|
"title": "Event",
|
||||||
|
"description": "event.",
|
||||||
|
"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": [
|
||||||
|
{
|
||||||
|
"maximum_count": -1,
|
||||||
|
"minimum_count": 1,
|
||||||
|
"require_all": false,
|
||||||
|
"sensor_range": 10,
|
||||||
|
"event": "example"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"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.",
|
"description": "A component that fires an event when a set of conditions are met by other entities within the defined range.",
|
||||||
"additionalProperties": false,
|
"oneOf": [
|
||||||
"properties": {
|
|
||||||
"maximum_count": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": -1,
|
|
||||||
"description": "The maximum number of entities that must pass the filter conditions for the event to send.",
|
|
||||||
"title": "Maximum Count"
|
|
||||||
},
|
|
||||||
"minimum_count": {
|
|
||||||
"type": "integer",
|
|
||||||
"default": 1,
|
|
||||||
"description": "The minimum number of entities that must pass the filter conditions for the event to send.",
|
|
||||||
"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": {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": false,
|
|
||||||
"description": "If true requires all nearby entities to pass the filter conditions for the event to send.",
|
|
||||||
"title": "Require All"
|
|
||||||
},
|
|
||||||
"sensor_range": {
|
|
||||||
"type": "number",
|
|
||||||
"default": 10,
|
|
||||||
"description": "The maximum distance another entity can be from this and have the filters checked against it.",
|
|
||||||
"title": "Sensor Range"
|
|
||||||
},
|
|
||||||
"event_filters": {
|
|
||||||
"$ref": "../../filters/filters.json"
|
|
||||||
},
|
|
||||||
"event": {
|
|
||||||
"title": "Event",
|
|
||||||
"description": "event.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
{
|
||||||
"maximum_count": -1,
|
"allOf": [
|
||||||
"minimum_count": 1,
|
{
|
||||||
"relative_range": true,
|
"$ref": "#/definitions/sensor_element"
|
||||||
"require_all": false,
|
},
|
||||||
"sensor_range": 10,
|
{
|
||||||
"event": "example"
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user