2020-11-01 17:22:42 +01:00
{
"$schema" : "http://json-schema.org/draft-07/schema" ,
2021-04-04 13:52:35 +02:00
"$id" : "blockception.minecraft.behavior.entities.1.16.0.minecraft.damage_sensor" ,
2021-03-21 15:18:38 +01:00
"title" : "Damage Sensor" ,
2020-11-01 17:22:42 +01:00
"description" : "Defines what events to call when this entity is damaged by specific entities or items." ,
"type" : "object" ,
"additionalProperties" : false ,
"definitions" : {
"trigger" : {
"properties" : {
"cause" : {
"type" : "string" ,
"default" : "none" ,
"description" : "Type of damage that triggers the events." ,
"title" : "Cause" ,
2021-03-11 11:53:21 +01:00
"$ref" : "../../../../general/entity/damage_source.json"
2020-11-01 17:22:42 +01:00
} ,
"damage_multiplier" : {
"type" : "number" ,
"default" : 1 ,
"description" : "A multiplier that modifies the base damage from the damage cause. If deals_damage is true the multiplier can only reduce the damage the entity will take to a minimum of 1." ,
2021-03-21 15:18:38 +01:00
"title" : "Damage Multiplier"
2020-11-01 17:22:42 +01:00
} ,
"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." ,
2021-03-21 15:18:38 +01:00
"title" : "Deals Damage"
2020-11-01 17:22:42 +01:00
} ,
"on_damage" : {
"additionalProperties" : false ,
"type" : "object" ,
"description" : "Specifies filters for entity definitions and events." ,
2021-03-21 15:18:38 +01:00
"title" : "On Damage" ,
2020-11-01 17:22:42 +01:00
"properties" : {
2021-03-21 15:18:38 +01:00
"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" }
2020-11-01 17:22:42 +01:00
} ,
2021-05-18 23:32:44 +02:00
"on_damage_sound_event" : {
"type" : "string" ,
"description" : "Defines what sound to play, if any, when the on_damage filters are met." ,
"title" : "On Damage Sound Event"
}
2020-11-01 17:22:42 +01:00
}
}
}
} ,
"properties" : {
"triggers" : {
"description" : "The list of triggers that fire when the environment conditions match the given filter criteria." ,
"title" : "Triggers" ,
"oneOf" : [
2021-03-21 15:18:38 +01:00
{ "type" : "array" , "items" : { "$ref" : "#/definitions/trigger" } } ,
{ "type" : "object" , "$ref" : "#/definitions/trigger" }
2020-11-01 17:22:42 +01:00
]
}
}
}