Files
minecraft-bedrock-json-schemas/source/behaviour/entities/1.13.0/components/minecraft.interact.json

127 lines
4.3 KiB
JSON
Raw Normal View History

2020-11-01 17:22:42 +01:00
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behaviour.entities.1.13.0.minecraft.interact",
"type": "object",
"title": "Interact 1.13.0",
"description": "Defines interactions with this entity.",
"additionalProperties": false,
"definitions": {
"interaction_spec": {
"type": "object",
"properties": {
"add_items": {
"type": "object",
"description": "Loot table with items to add to the player's inventory upon successful interaction.",
"title": "Add items"
},
"cooldown": {
"type": "number",
"default": 0,
"description": "Time in seconds before this entity can be interacted with again.",
"title": "Cooldown"
},
"hurt_item": {
"type": "integer",
"default": 0,
"description": "The amount of damage the item will take when used to interact with this entity. A value of 0 means the item won't lose durability.",
"title": "Hurt item"
},
"interact_text": {
"type": "string",
"default": "",
"description": "Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls.",
"title": "Interact text"
},
"on_interact": {
"$ref": "../types/trigger.json",
"description": "Event to fire when the interaction occurs.",
"title": "On interact"
},
"particle_on_start": {
"type": "object",
"description": "Particle effect that will be triggered at the start of the interaction.",
"title": "Particle on start",
"properties": {
"particle_offset_towards_interactor": {
"type": "boolean",
"description": "Whether or not the particle will appear closer to who performed the interaction.",
"title": "Particle offset towards interactor"
},
"particle_type": {
"type": "string",
"description": "The type of particle that will be spawned.",
"title": "Particle type"
},
"particle_y_offset": {
"type": "number",
"description": "Will offset the particle this amount in the y direction.",
"title": "Particle y offset"
}
}
},
"play_sounds": {
"type": "string",
"default": "",
"description": "List of sounds to play when the interaction occurs.",
"title": "Play sounds"
},
"spawn_entities": {
"type": "string",
"default": "",
"description": "List of entities to spawn when the interaction occurs.",
"title": "Spawn entities"
},
"spawn_items": {
"type": "object",
"description": "Loot table with items to drop on the ground upon successful interaction.",
"title": "Spawn items",
"properties": {
"table": {
"type": "string",
"default": "",
"description": "File path, relative to the Behavior Pack's path, to the loot table file.",
"title": "Table"
}
}
},
"swing": {
"type": "boolean",
"default": false,
"description": "If true, the player will do the 'swing' animation when interacting with this entity.",
"title": "Swing"
},
"transform_to_item": {
"type": "string",
"default": "",
"description": "The item used will transform to this item upon successful interaction. Format: itemName:auxValue",
"title": "Transform to item"
},
"use_item": {
"type": "boolean",
"default": false,
"description": "If true, the interaction will use an item.",
"title": "Use item"
}
}
}
},
"properties": {
"interactions": {
"oneOf": [
{
"type": "object",
"$ref": "#/definitions/interaction_spec"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/interaction_spec"
}
}
],
"description": "TODO description",
"title": "TODO title"
}
}
}