Files
minecraft-bedrock-json-schemas/source/behavior/entities/format/behaviors/panic.json
Piotr Brzozowski c60e5c0d39 Add sound event schema and use where appropriate (#120)
* Fix typo in module name

* Add sound_event schema and add it where appropriate
2022-10-02 21:51:03 +02:00

77 lines
2.4 KiB
JSON

{
"$id": "blockception.minecraft.behavior.entities.minecraft.behavior.panic",
"description": "Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.",
"type": "object",
"title": "Panic",
"additionalProperties": false,
"required": [],
"properties": {
"priority": {
"$ref": "./types/priority.json"
},
"speed_multiplier": {
"$ref": "./types/speed_multiplier.json"
},
"damage_sources": {
"title": "Damage Sources",
"type": "array",
"items": {
"$ref": "../../../../general/entity/damage_source.json"
},
"default": [["all"]],
"description": "The list of Entity Damage Sources that will cause this mob to panic."
},
"force": {
"title": "Force",
"type": "boolean",
"default": false,
"description": "If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it."
},
"ignore_mob_damage": {
"title": "Ignore Mob Damage",
"type": "boolean",
"default": false,
"description": "If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in `damage_sources`"
},
"prefer_water": {
"title": "Prefer Water",
"type": "boolean",
"default": false,
"description": "If true, the mob will prefer water over land."
},
"panic_sound": {
"title": "Panic Sound",
"$ref": "../../../../general/sound_event.json",
"description": "The sound event to play when this mob is in panic."
},
"sound_interval": {
"title": "Sound Interval",
"type": "object",
"description": "The range of time in seconds to randomly wait before playing the sound again.",
"properties": {
"range_min": {
"type": "number",
"description": "The minimum time in seconds before the `panic_sound` plays.",
"title": "Range Minimum"
},
"range_max": {
"type": "number",
"description": "The maximum time in seconds before the `panic_sound` plays.",
"title": "Range Maximum"
}
},
"additionalProperties": false
}
},
"examples": [
{
"damage_sources": [],
"force": false,
"ignore_mob_damage": false,
"prefer_water": false,
"panic_sound": "example",
"sound_interval": {}
}
]
}