EntityTameableComponent Class
Defines the rules for an entity to be tamed by the player.
read-only getTameItems: ItemStack[];
Returns a set of items that can be used to tame this entity.
Type: ItemStack[]
Notes:
- This property can throw errors when used.
read-only isTamed: boolean;
Returns true if the entity is tamed by player.
Type: boolean
Notes:
- This property can throw errors when used.
read-only probability: number;
The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%
Type: number
Notes:
- This property can throw errors when used.
read-only tamedToPlayer?: Player;
Returns the player that has tamed the entity, or 'undefined' if entity is not tamed.
Type: Player
Notes:
- This property can throw errors when used.
read-only tamedToPlayerId?: string;
Returns the id of player that has tamed the entity, or 'undefined' if entity is not tamed.
Type: string
Notes:
- This property can throw errors when used.
tame(player: Player): boolean
Set this entity as tamed by the given player.
player: Player
The player that this entity should be tamed by.
Returns boolean - Returns true if the entity was tamed.
Notes:
- This function can't be called in read-only mode.
- This function can throw errors.
static read-only componentId = "minecraft:tameable";
Type: string