Nameable¶
文档版本:1.21.50.25
Allows this entity to be named (e.g. using a name tag).
架构¶
nameable:
{
boolean "allow_name_tag_renaming" : opt
boolean "always_show" : opt
trigger "default_trigger"
array "name_actions" : opt
{
object "<any array element>" : opt
{
string "name_filter" : opt
event_object "on_named"
}
}
object "name_actions" : opt
{
}
}
allow_name_tag_renaming:boolean- If true, this entity can be renamed with name tags.
always_show:boolean- If true, the name will always be shown.
default_trigger:trigger- Trigger to run when the entity gets named.
event:string- The event to run when the conditions for this trigger are met.
filters:filters- 一个过滤器组。The list of conditions for this trigger to execute.
target:subject- The target of the event.
trigger:
array
{
object "<any array element>" : opt
{
string "event" : opt
filters "filters"
subject "target"
}
}
<any array element>:object
<any array element>name_actions:array- Describes the special names for this entity and the events to call when the entity acquires those names.
name_actions<any array element>:object- Describes the special names for this entity and the events to call when the entity acquires those names.
<any array element>name_filter:string- List of special names that will cause the events defined in
on_namedto fire.
on_named:event_object- Event to be called when this entity acquires the name specified in `name_filter'.
name_actions:object- Describes the special names for this entity and the events to call when the entity acquires those names.
name_actions