实验性
Allows the entity to be leashed. Defines the conditions and events for when an entity is leashed.
只读
Returns true if another entity can 'steal' the leashed entity by attaching their own leash to it.
This property can throw when used.
The entity that owns this component. The entity will be undefined if it has been removed.
Distance in blocks at which the leash stiffens, restricting movement.
Returns true if the entity is leashed.
可选
Entity that is holding the leash.
Identifier of entity that is holding the leash.
Distance in blocks at which the leash breaks.
Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it.
Identifier of the component.
静态
Whether the component is valid.
Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.
The entity to leash this entity to.
Leashes this entity to another entity.
无法在只读模式下调用此函数,详见 WorldBeforeEvents。
Throws if the entity to leash to is over the max distance, and if the player is dead or in spectator mode.
Unleashes this entity if it is leashed to another entity.
This function can throw errors.
Allows the entity to be leashed. Defines the conditions and events for when an entity is leashed.