Files
minecraft-bedrock-json-schemas/source/behavior/entities/format/components/leashable.json
ChibiMango 534d77c389 Created & applied new event_object type (#109)
Created new event type.
some components only allow for an event to be an object, not a string
Co-authored-by: Daan Verstraten <daanverstraten@hotmail.com>
2022-08-22 20:13:13 +02:00

52 lines
1.6 KiB
JSON

{
"$id": "blockception.minecraft.behavior.entities.minecraft.leashable",
"type": "object",
"title": "Leashable",
"description": "Allows this entity to be leashed and defines the conditions and events for this entity when is leashed.",
"additionalProperties": false,
"properties": {
"can_be_stolen": {
"type": "boolean",
"default": false,
"description": "If true, players can leash this entity even if it is already leashed to another mob.",
"title": "Can Be Stolen"
},
"hard_distance": {
"type": "number",
"default": 6,
"description": "Distance in blocks at which the leash stiffens, restricting movement.",
"title": "Hard Distance"
},
"max_distance": {
"type": "number",
"default": 10,
"description": "Distance in blocks at which the leash breaks.",
"title": "Maximum Distance"
},
"on_leash": {
"$ref": "../types/event_object.json",
"description": "Event to call when this entity is leashed.",
"title": "On Leash"
},
"on_unleash": {
"$ref": "../types/event_object.json",
"description": "Event to call when this entity is unleashed.",
"title": "On Unleash"
},
"soft_distance": {
"type": "number",
"default": 4,
"description": "Distance in blocks at which the `spring` effect starts acting to keep this entity close to the entity that leashed it.",
"title": "Soft Distance"
}
},
"examples": [
{
"can_be_stolen": false,
"hard_distance": 6,
"max_distance": 10,
"soft_distance": 4
}
]
}