Leashable¶
文档版本:1.21.50.25
Allows this entity to be leashed and defines the conditions and events for this entity when is leashed.
架构¶
leashable:
{
boolean "can_be_stolen" : opt
number "hard_distance" : opt
number "max_distance" : opt
event_object "on_leash"
event_object "on_unleash"
number "soft_distance" : opt
}
can_be_stolen
:boolean- If true, players can leash this entity even if it is already leashed to another mob.
hard_distance
:number- Distance in blocks at which the leash stiffens, restricting movement.
max_distance
:number- Distance in blocks at which the leash breaks.
on_leash
:event_object- Event to call when this entity is leashed.
on_unleash
:event_object- Event to call when this entity is unleashed.
soft_distance
:number- Distance in blocks at which the
spring
effect starts acting to keep this entity close to the entity that leashed it.