2021-06-06 10:07:19 +00:00
{
2021-10-08 12:54:09 +02:00
"$id" : "blockception.minecraft.behavior.entities.1.16.0.minecraft.damage_sensor" ,
"title" : "Damage Sensor" ,
2021-06-06 10:07:19 +00:00
"description" : "Defines what events to call when this entity is damaged by specific entities or items." ,
2021-10-08 12:52:52 +02:00
"type" : "object" ,
"additionalProperties" : false ,
2021-06-06 10:07:19 +00:00
"definitions" : {
2021-10-08 12:52:52 +02:00
"trigger" : {
2021-06-06 10:07:19 +00:00
"properties" : {
"cause" : {
"type" : "string" ,
"default" : "none" ,
"description" : "Type of damage that triggers the events." ,
2021-10-08 12:52:52 +02:00
"title" : "Cause" ,
"$ref" : "../../../../general/entity/damage_source.json"
} ,
"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." ,
"title" : "Damage Multiplier"
2021-06-06 10:07:19 +00: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." ,
"title" : "Deals Damage"
} ,
"on_damage" : {
"type" : "object" ,
"description" : "Specifies filters for entity definitions and events." ,
2021-07-02 13:00:02 +02:00
"title" : "On Damage" ,
2021-10-08 12:54:09 +02:00
"$ref" : "../types/trigger.json"
2021-10-08 12:52:52 +02:00
} ,
"on_damage_sound_event" : {
2021-10-08 12:54:09 +02:00
"type" : "string" ,
2021-10-08 12:52:52 +02:00
"description" : "Defines what sound to play, if any, when the on_damage filters are met." ,
"title" : "On Damage Sound Event"
2021-06-06 10:07:19 +00:00
}
2021-07-02 13:00:02 +02:00
}
2021-06-06 10:07:19 +00:00
}
} ,
2021-10-08 12:52:52 +02:00
"properties" : {
"triggers" : {
2021-10-08 12:54:09 +02:00
"description" : "The list of triggers that fire when the environment conditions match the given filter criteria." ,
2021-10-08 12:52:52 +02:00
"title" : "Triggers" ,
"oneOf" : [
{ "type" : "array" , "items" : { "$ref" : "#/definitions/trigger" } } ,
{ "type" : "object" , "$ref" : "#/definitions/trigger" }
]
}
}
2021-06-06 10:07:19 +00:00
}