Script API - v1.19.70
    Preparing search index...

    Allows this entity to be leashed and defines the conditions and events for this entity when is leashed.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    softDistance: number

    Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it.

    This property can throw when used.

    typeId: string

    Identifier of this component. Should always be minecraft:leashable.

    componentId: "minecraft:leashable" = 'minecraft:leashable'

    Identifier of this component. Should always be minecraft:leashable.

    Methods

    • Beta

      Parameters

      • leashHolder: Entity

        The entity to leash this entity to.

      Returns void

      Leashes this entity to another entity.

      This function can throw errors.

    • Beta

      Returns void

      Unleashes this entity if it is leashed to another entity.

      This function can throw errors.