跳转至

EntityLeashableComponent

文档版本:1.21.60.21

EntityLeashableComponent类,扩展自EntityComponent。script_api.minecraft/server.entityleashablecomponent.description

常量

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

属性

canBeStolen
read-only canBeStolen: boolean;
hardDistance
read-only hardDistance: float;
isLeashed
read-only isLeashed: boolean;
leashHolder
read-only leashHolder: Entity | undefined;
leashHolderEntityId
read-only leashHolderEntityId: string | undefined;
leashHolderEntityIdstring|undefined
script_api.minecraft/server.entityleashablecomponent.leashholderentityid.description
maxDistance
read-only maxDistance: float;
softDistance
read-only softDistance: float;

方法

leashTo

script_api.minecraft/server.entityleashablecomponent.leashto.description

leashTo(leashHolder: Entity): void
unleash

script_api.minecraft/server.entityleashablecomponent.unleash.description

unleash(): void