Entity Documentation - minecraft:nameable

minecraft:nameable allows the entity to be named (e.g. using a name tag).

Parameters

Name Default Value Type Description
allow_name_tag_renaming True Boolean If true, the entity can be renamed with name tags
always_show False Boolean If true, the name will always be shown
default_trigger not set String Trigger to run when the entity gets named
name_actions not set JSON Object Describes the special names for the entity and the events to call when the entity acquires those names

name_actions

name_actions is a JSON object defined by two parameters. Each item has the following properties:

Name Default Value Type Description
name_filter not set String List of special names that will cause the events defined in 'on_named' to initiate
on_named not set String Event to be called when the entity acquires the name specified in 'name_filter'

Example

"minecraft:nameable": {
  "allow_name_tag_renaming": true,
  "always_show": false,
  "default_trigger": {
    "event": "minecraft:celebrate",
    "target": "self"
  },
  "name_actions": [
    {
      "name_filter": "bacon",
      "on_named": {
        "event": "minecraft:spawn_child",
        "target": "self"
      }
    }
  ]
}

Vanilla entities examples

cat

"minecraft:nameable": {
}

Vanilla entities using minecraft:nameable