minecraft:leashable_to for you with a switch.Get GodCraftOverview
minecraft:leashable_to is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players tie leashed entities to this entity, take them back, or cut them free with shears. Cutting works only if the leashed entity has "can_be_cut" turned on.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
can_retrieve_from | Boolean | "false" | Lets players take back entities leashed to this one. |
unleash_on_removal | Boolean | "true" | Frees everything leashed to this entity when the component is removed. |
Example
Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):
BP/entities/<name>.json
{
"minecraft:leashable_to": {
"can_retrieve_from": "false",
"unleash_on_removal": "true"
}
}