Class EntityLeashableComponentBeta

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

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

softDistance: number

Remarks

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

Throws

This property can throw when used.

typeId: string
componentId: "minecraft:leashable" = 'minecraft:leashable'

Remarks

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

Methods

  • Parameters

    • leashHolder: Entity

      The entity to leash this entity to.

    Returns void

    Remarks

    Leashes this entity to another entity.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.

  • Returns void

    Remarks

    Unleashes this entity if it is leashed to another entity.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.