Files
minecraft-bedrock-json-schemas/source/behavior/entities/format/components/nameable.json

70 lines
2.0 KiB
JSON
Raw Normal View History

2021-10-08 12:59:03 +02:00
{
2021-10-08 13:04:13 +02:00
"$id": "blockception.minecraft.behavior.entities.minecraft.nameable",
2021-10-08 12:59:03 +02:00
"type": "object",
2021-10-08 13:04:13 +02:00
"title": "Nameable",
2021-10-08 12:59:03 +02:00
"additionalProperties": false,
"description": "Allows this entity to be named (e.g. using a name tag).",
"definitions": {
"name_action": {
"type": "object",
"additionalProperties": false,
2022-07-22 19:41:04 +02:00
"description": "Describes the special names for this entity and the events to call when the entity acquires those names.",
2021-10-08 12:59:03 +02:00
"title": "Name Action",
"properties": {
"name_filter": {
"type": "string",
"default": "",
2022-07-22 19:41:04 +02:00
"description": "List of special names that will cause the events defined in `on_named` to fire.",
2021-10-08 12:59:03 +02:00
"title": "Name Filter"
},
"on_named": {
"$ref": "../types/event_object.json",
2022-07-22 19:41:04 +02:00
"description": "Event to be called when this entity acquires the name specified in `name_filter'.",
2021-10-08 12:59:03 +02:00
"title": "On Named"
}
}
}
},
"properties": {
"allow_name_tag_renaming": {
"type": "boolean",
"default": true,
2022-07-22 19:41:04 +02:00
"description": "If true, this entity can be renamed with name tags.",
2021-10-08 12:59:03 +02:00
"title": "Allow Name Tag Renaming"
},
2021-10-11 18:10:42 +02:00
"always_show": {
"type": "boolean",
"default": false,
2022-07-22 19:41:04 +02:00
"description": "If true, the name will always be shown.",
2021-10-11 18:10:42 +02:00
"title": "Always Show"
},
"default_trigger": {
"$ref": "../types/trigger.json",
2022-07-22 19:41:04 +02:00
"description": "Trigger to run when the entity gets named.",
2021-10-11 18:10:42 +02:00
"title": "Default Trigger"
},
2021-10-08 12:59:03 +02:00
"name_actions": {
"title": "Name Actions",
2022-07-22 19:41:04 +02:00
"description": "Describes the special names for this entity and the events to call when the entity acquires those names.",
2021-10-08 12:59:03 +02:00
"oneOf": [
2021-10-11 18:10:42 +02:00
{
"type": "array",
"items": {
"$ref": "#/definitions/name_action"
}
},
{
"type": "object",
"$ref": "#/definitions/name_action"
}
2021-10-08 12:59:03 +02:00
]
}
2021-10-11 18:10:42 +02:00
},
"examples": [
{
"allow_name_tag_renaming": true,
"always_show": false
}
]
2021-10-08 12:59:03 +02:00
}