1. Wiki
  2. /Entities
  3. /minecraft:nameable

minecraft:nameable

Don't want to write this by hand? GodCraft sets minecraft:nameable for you with a switch.Get GodCraft

Overview

minecraft:nameable is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Lets players give the entity a custom name, for example with a name tag. You can also run events when it gets a special name, like the "jeb_" trick on sheep.

Fields

FieldTypeDefaultDescription
allow_name_tag_renamingBoolean"true"If true, players can rename the entity with a name tag.
always_showBoolean"false"If true, the name floats above the entity even when you are not looking at it.
default_triggerStringnoneEvent to run whenever the entity is given any name.
name_actionsJSON ObjectnoneSpecial names and the events each one runs when the entity receives it.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:nameable": {
    "allow_name_tag_renaming": "true",
    "always_show": "false",
    "default_trigger": "",
    "name_actions": {}
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more