Entity Documentation - minecraft:leashable
minecraft:leashable
allows an entity to be leashed and defines the conditions and events for the entity when is leashed.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
can_be_stolen | False | Boolean | If true, players can leash the entity even if it is already leashed to another mob. |
hard_distance | 6 | Decimal | Distance in blocks at which the leash stiffens, restricting movement. |
max_distance | 10 | Decimal | Distance in blocks at which the leash breaks. |
on_leash | not set | JSON Object | Event to call when this entity is leashed. |
on_unleash | not set | JSON Object | Event to call when this entity is unleashed. |
soft_distance | 4 | Decimal | Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it. |
Example
"minecraft:leashable": {
"soft_distance": 4.0,
"hard_distance": 6.0,
"max_distance": 10.0,
"on_leash": {
"event": "minecraft:on_leash",
"target": "self"
},
"on_unleash": {
"event": "minecraft:on_unleash",
"target": "self"
}
}
Vanilla entities examples
wolf
"minecraft:leashable": {
"soft_distance": 4.0,
"hard_distance": 6.0,
"max_distance": 10.0,
"on_leash": {
"event": "minecraft:on_leash",
"target": "self"
},
"on_unleash": {
"event": "minecraft:on_unleash",
"target": "self"
}
}
Vanilla entities using minecraft:leashable
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for