跳转至

EntityTameableComponent

文档版本:1.21.0.24

EntityTameableComponent类,扩展自EntityComponent。script_api.minecraft/server.entitytameablecomponent.description

常量

componentId
static read-only componentId = "minecraft:tameable";

属性

getTameItems
read-only getTameItems: ItemStack[];
isTamed
read-only isTamed: boolean;
probability
read-only probability: float;
tamedToPlayer
read-only tamedToPlayer: Player | undefined;
tamedToPlayerId
read-only tamedToPlayerId: string | undefined;
tamedToPlayerIdstring|undefined
script_api.minecraft/server.entitytameablecomponent.tamedtoplayerid.description

方法

tame

script_api.minecraft/server.entitytameablecomponent.tame.description

tame(player: Player): boolean