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
- armor_stand
- axolotl
- bat
- bee
- blaze
- cat
- cave_spider
- chicken
- cow
- creeper
- dolphin
- donkey
- drowned
- elder_guardian
- enderman
- endermite
- evocation_illager
- fish
- fox
- ghast
- glow_squid
- goat
- guardian
- hoglin
- horse
- husk
- iron_golem
- llama
- magma_cube
- mooshroom
- mule
- npc
- ocelot
- panda
- parrot
- phantom
- pig
- piglin_brute
- piglin
- pillager
- player
- polar_bear
- pufferfish
- rabbit
- ravager
- salmon
- sheep
- shulker
- silverfish
- skeleton_horse
- skeleton
- slime
- snow_golem
- spider
- squid
- stray
- strider
- tropicalfish
- turtle
- vex
- villager_v2
- villager
- vindicator
- witch
- wither_skeleton
- wither
- wolf
- zoglin
- zombie_horse
- zombie_pigman
- zombie_villager_v2
- zombie_villager
- zombie
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for