2021-10-08 12:59:03 +02:00
|
|
|
{
|
2021-10-08 13:04:13 +02:00
|
|
|
"$id": "blockception.minecraft.behavior.entities.minecraft.attack",
|
2021-10-08 12:59:03 +02:00
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
2021-10-08 13:04:13 +02:00
|
|
|
"title": "Attack",
|
2021-10-08 12:59:03 +02:00
|
|
|
"description": "Defines an entity's melee attack and any additional effects on it.",
|
2025-03-03 12:44:05 +05:00
|
|
|
"required": [ "damage" ],
|
2021-10-08 12:59:03 +02:00
|
|
|
"properties": {
|
|
|
|
|
"damage": {
|
2021-10-11 19:03:09 +02:00
|
|
|
"title": "Damage",
|
2021-10-11 19:10:26 +02:00
|
|
|
"$ref": "../types/range_number_type.json",
|
|
|
|
|
"description": "Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it."
|
2021-10-08 12:59:03 +02:00
|
|
|
},
|
|
|
|
|
"effect_name": {
|
|
|
|
|
"type": "string",
|
2024-06-29 00:06:53 +05:00
|
|
|
"$ref": "../../../../general/vanilla/effect.json",
|
2021-10-08 12:59:03 +02:00
|
|
|
"description": "Identifier of the status ailment to apply to an entity attacked by this entity's melee attack.",
|
|
|
|
|
"title": "Effect Name"
|
|
|
|
|
},
|
|
|
|
|
"effect_duration": {
|
2025-03-03 12:44:05 +05:00
|
|
|
"anyOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "integer",
|
|
|
|
|
"default": 1,
|
|
|
|
|
"minimum": 0
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"const": "infinite"
|
|
|
|
|
}
|
|
|
|
|
],
|
2021-10-08 12:59:03 +02:00
|
|
|
"description": "Duration in seconds of the status ailment applied to the damaged entity.",
|
|
|
|
|
"title": "Effect Duration"
|
|
|
|
|
}
|
2021-10-11 18:10:42 +02:00
|
|
|
},
|
2025-03-03 12:44:05 +05:00
|
|
|
"examples": [ { "damage": 1 }, { "damage": 1, "effect_name": "example", "effect_duration": 1 } ]
|
2021-10-08 12:59:03 +02:00
|
|
|
}
|