EntityLeashableComponent¶
 文档版本:1.21.60.21
EntityLeashableComponent类,扩展自EntityComponent。script_api.minecraft/server.entityleashablecomponent.description
常量¶
componentId
属性¶
canBeStolen
canBeStolen:boolean- script_api.minecraft/server.entityleashablecomponent.canbestolen.description
 
hardDistance
hardDistance:float- script_api.minecraft/server.entityleashablecomponent.harddistance.description
 
isLeashed
isLeashed:boolean- script_api.minecraft/server.entityleashablecomponent.isleashed.description
 
leashHolder
leashHolder:Entity|undefined- script_api.minecraft/server.entityleashablecomponent.leashholder.description
 
leashHolderEntityId
leashHolderEntityId:string|undefined- script_api.minecraft/server.entityleashablecomponent.leashholderentityid.description
 
maxDistance
maxDistance:float- script_api.minecraft/server.entityleashablecomponent.maxdistance.description
 
softDistance
softDistance:float- script_api.minecraft/server.entityleashablecomponent.softdistance.description
 
方法¶
leashTo
script_api.minecraft/server.entityleashablecomponent.leashto.description
leashHolder:Entity- script_api.minecraft/server.entityleashablecomponent.leashto.leashholder.description
 
- 返回值:
void - script_api.minecraft/server.entityleashablecomponent.leashto.return
 
unleash
script_api.minecraft/server.entityleashablecomponent.unleash.description
- 返回值:
void - script_api.minecraft/server.entityleashablecomponent.unleash.return