Private
constructorReadonly
canReturns true if another entity can 'steal' the leashed entity by attaching their own leash to it.
This property can throw when used.
Readonly
entityThe entity that owns this component. The entity will be undefined if it has been removed.
Readonly
hardDistance in blocks at which the leash stiffens, restricting movement.
This property can throw when used.
Readonly
isReturns true if the entity is leashed.
This property can throw when used.
Optional
Readonly
leashEntity that is holding the leash.
This property can throw when used.
Optional
Readonly
leashIdentifier of entity that is holding the leash.
This property can throw when used.
Readonly
maxDistance in blocks at which the leash breaks.
This property can throw when used.
Readonly
softDistance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it.
This property can throw when used.
Readonly
typeIdentifier of the component.
Static
Readonly
componentThe entity to leash this entity to.
Leashes this entity to another entity.
This function can't be called in read-only mode.
Throws if the entity to leash to is over the max distance, and if the player is dead or in spectator mode.
Allows the entity to be leashed. Defines the conditions and events for when an entity is leashed.
Example
entityLeashable.js