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

    Class EntityTameableComponent

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

    const wolf = world.getDimension("overworld").spawnEntity("minecraft:wolf", { x: 0, y: 0, z: 0 });
    const tameable = wolf.getComponent("tameable");
    tameable.probability;
    tameable.tame(world.getAllPlayers()[0]);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entity: Entity

    This property can throw errors.

    InvalidEntityError

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

    getTameItems: ItemStack[]

    This property can throw errors.

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

    isTamed: boolean

    This property can throw errors.

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

    isValid: boolean
    probability: number

    This property can throw errors.

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

    tamedToPlayer?: Player

    This property can throw errors.

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

    tamedToPlayerId?: string

    This property can throw errors.

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

    typeId: string

    Methods

    • Parameters

      Returns boolean

      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.