1. Wiki
  2. /Entities
  3. /minecraft:leashable_to

minecraft:leashable_to

Don't want to write this by hand? GodCraft sets minecraft:leashable_to for you with a switch.Get GodCraft

Overview

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

FieldTypeDefaultDescription
can_retrieve_fromBoolean"false"Lets players take back entities leashed to this one.
unleash_on_removalBoolean"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"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more