Files
minecraft-bedrock-json-schemas/source/behavior/entities/1.8.0/components/minecraft.damage_sensor.json
2021-04-04 13:52:35 +02:00

47 lines
1.8 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.entities.1.8.0.minecraft.damage_sensor",
"title": "Damage Sensor 1.8.0",
"additionalProperties": false,
"description": "Defines what events to call when this entity is damaged by specific entities or items.",
"definitions": {
"damagespec": {
"type": "object",
"description": "A trigger with the events to call when taking specific kinds of damage.",
"additionalProperties": false,
"properties": {
"cause": {
"type": "string",
"default": "none",
"description": "Type of damage that triggers the events.",
"$ref": "../../../../general/entity_damage.json",
"title": "Cause"
},
"deals_damage": {
"type": "boolean",
"default": true,
"description": "If true, the damage dealt to the entity will take away health from it, set to false to make the entity ignore that damage.",
"title": "Deals Damage"
},
"on_damage": {
"additionalProperties": false,
"type": "object",
"properties": {
"filters": { "$ref": "../filters.json" },
"event": { "type": "string", "pattern": "^.*$", "description": "TODO description: event", "title": "Event" },
"target": { "$ref": "../filters/types/base_subject.json", "description": "TODO description: target", "title": "Target" }
},
"description": "Specifies filters for entity definitions and events.",
"title": "On Damage"
}
},
"title": "Damagespec"
}
},
"required": [],
"oneOf": [
{ "type": "object", "$ref": "#/definitions/damagespec" },
{ "type": "array", "items": { "$ref": "#/definitions/damagespec" } }
]
}