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

    Class EntityLeashableComponent

    import { world } from "@minecraft/server";

    const entity = world.getEntity("-10000000000");
    const leashHolderEntity = world.getEntity("-10000000000");
    const leashable = entity.getComponent("leashable");
    leashable.softDistance;
    leashable.leashTo(leashHolderEntity); // Assuming you have an 'leashHolderEntity' instance
    leashable.unleash();
    leashable.isValid;

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    canBeStolen: boolean

    This property can throw errors.

    This property can't be read in early-execution mode.

    entity: Entity

    This property can throw errors.

    InvalidEntityError

    This property can't be read in early-execution mode.

    hardDistance: number

    This property can throw errors.

    This property can't be read in early-execution mode.

    isLeashed: boolean

    This property can throw errors.

    This property can't be read in early-execution mode.

    isValid: boolean
    leashHolder?: Entity

    This property can throw errors.

    This property can't be read in early-execution mode.

    leashHolderEntityId?: string

    This property can throw errors.

    This property can't be read in early-execution mode.

    maxDistance: number

    This property can throw errors.

    This property can't be read in early-execution mode.

    softDistance: number

    This property can throw errors.

    This property can't be read in early-execution mode.

    typeId: string

    Methods

    • Parameters

      Returns void

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

      This function can throw errors.

      This function can't be called in early-execution mode.

    • Returns void

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

      This function can throw errors.

      This function can't be called in early-execution mode.