Files
minecraft-bedrock-json-schemas/behaviour/entities/1.16.100/behaviors/minecraft.behavior.nearest_attackable_target.json
2020-11-18 10:02:20 +01:00

143 lines
5.4 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behaviour.entities.1.16.100.minecraft.behavior.nearest_attackable_target",
"type": "object",
"title": "Behavior.nearest_attackable_target 1.16.100",
"description": "Allows the mob to check for and pursue the nearest valid target.",
"additionalProperties": false,
"required": [],
"definitions": {
"entity_type": {
"type": "object",
"description": "A entity type",
"properties": {
"filters": {
"$ref": "../filters.json",
"description": "Conditions that make this target a valid type.",
"title": "Filters"
},
"max_dist": {
"type": "number",
"default": 16,
"description": "To be a valid target choice, the target type cannot be farther away from this entity than \"max_dist\".",
"title": "Max dist"
},
"must_see": {
"type": "boolean",
"default": false,
"description": "Determines if target-validity requires this entity to be in range only, or both in range and in sight.",
"title": "Must see"
},
"must_see_forget_duration": {
"type": "boolean",
"default": 3,
"description": "Time (in seconds) the target must not be seen by this entity to become invalid. Used only if \"must_see\" is true.",
"title": "Must see forget duration"
}
}
}
},
"properties": {
"priority": { "$ref": "types/base_priority.json" },
"entity_types": {
"description": "Filters which types of targets are valid for this entity.",
"title": "Entity types",
"oneOf": [
{
"$ref": "#/definitions/entity_type"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/entity_type"
}
}
]
},
"attack_interval": {
"type": "integer",
"default": 0,
"description": "Time range (in seconds) between searching for an attack target, range is in (0, \"attack_interval\"]. Only used if \"attack_interval\" is greater than 0, otherwise \"scan_interval\" is used.",
"title": "Attack interval"
},
"attack_interval_min": {
"type": "number",
"default": 0,
"description": "Alias for \"attack_interval\"; provides the same functionality as \"attack_interval\".",
"title": "Attack interval min"
},
"attack_owner": {
"type": "boolean",
"default": false,
"description": "If true, this entity can attack its owner.",
"title": "Attack owner"
},
"must_reach": {
"type": "boolean",
"default": false,
"description": "If true, this entity requires a path to the target.",
"title": "Must reach"
},
"must_see": {
"type": "boolean",
"default": false,
"description": "Determines if target-validity requires this entity to be in range only, or both in range and in sight.",
"title": "Must see"
},
"must_see_forget_duration": {
"type": "number",
"default": 3,
"description": "Time (in seconds) the target must not be seen by this entity to become invalid. Used only if \"must_see\" is true.",
"title": "Must see forget duration"
},
"persist_time": {
"type": "number",
"default": 0,
"description": "Time (in seconds) this entity can continue attacking the target after the target is no longer valid.",
"title": "Persist time"
},
"reselect_targets": {
"type": "boolean",
"default": false,
"description": "Allows the attacking entity to update the nearest target, otherwise a target is only reselected after each \"scan_interval\" or \"attack_interval\".",
"title": "Reselect targets"
},
"scan_interval": {
"type": "integer",
"default": 10,
"description": "If \"attack_interval\" is 0 or isn't declared, then between attacks: scanning for a new target occurs every amount of ticks equal to \"scan_interval\", minimum value is 1. Values under 10 can affect performance.",
"title": "Scan interval"
},
"set_persistent": {
"type": "boolean",
"default": false,
"description": "Allows the actor to be set to persist upon targeting a player",
"title": "Set persistent"
},
"target_invisible_multiplier": {
"type": "number",
"default": 0.7,
"description": "Multiplied with the target's armor coverage percentage to modify \"max_dist\" when detecting an invisible target.",
"title": "Target invisible multiplier"
},
"target_search_height": {
"type": "number",
"default": -1,
"description": "Maximum vertical target-search distance, if it's greater than the target type's \"max_dist\". A negative value defaults to \"entity_types\" greatest \"max_dist\".",
"title": "Target search height"
},
"target_sneak_visibility_multiplier": {
"type": "number",
"default": 0.8,
"description": "Multiplied with the target type's \"max_dist\" when trying to detect a sneaking target.",
"title": "Target sneak visibility multiplier"
},
"within_radius": {
"type": "number",
"default": 0,
"description": "Maximum distance this entity can be from the target when following it, otherwise the target becomes invalid. This value is only used if the entity doesn't declare \"minecraft:follow_range\".",
"title": "Within radius"
}
}
}