2020-11-01 17:22:42 +01:00
{
"$schema" : "http://json-schema.org/draft-07/schema" ,
2021-04-04 13:52:35 +02:00
"$id" : "blockception.minecraft.behavior.entities.1.8.0.minecraft.interact" ,
2020-11-01 17:22:42 +01:00
"description" : "Defines interactions with this entity." ,
"title" : "Interact 1.8.0" ,
"additionalProperties" : false ,
"definitions" : {
"interact_object" : {
"type" : "object" ,
"description" : "An interact object" ,
"title" : "Interact" ,
"properties" : {
"add_items" : {
"type" : "object" ,
"description" : "Loot table with items to add to the player's inventory upon successful interaction" ,
2021-03-21 15:18:38 +01:00
"properties" : { "table" : { "type" : "string" , "description" : "File path, relative to the Behavior Pack's path, to the loot table file" } }
2020-11-01 17:22:42 +01:00
} ,
2021-03-21 15:18:38 +01:00
"cooldown" : { "type" : "number" , "default" : 0 , "description" : "Time in seconds before this entity can be interacted with again" } ,
2020-11-01 17:22:42 +01:00
"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"
} ,
"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"
} ,
"on_interact" : { "$ref" : "../types/trigger.json" } ,
"particle_on_start" : {
"type" : "object" ,
"description" : "Particle effect that will be triggered at the start of the interaction" ,
"properties" : {
2021-03-21 15:18:38 +01:00
"particle_type" : { "type" : "string" , "description" : "The type of particle that will be spawned" } ,
"particle_y_offset" : { "type" : "string" , "description" : "Will offset the particle this amount in the y direction" } ,
"particle_offset_towards_interactor" : { "type" : "string" , "description" : "Whether or not the particle will appear closer to who performed the interaction" }
2020-11-01 17:22:42 +01:00
}
} ,
2021-03-21 15:18:38 +01:00
"play_sounds" : { "type" : "string" , "default" : "" , "description" : "List of sounds to play when the interaction occurs" } ,
"spawn_entities" : { "type" : "string" , "default" : "" , "description" : "List of entities to spawn when the interaction occurs" } ,
2020-11-01 17:22:42 +01:00
"spawn_items" : {
"type" : "object" ,
"description" : "Loot table with items to drop on the ground upon successful interaction" ,
2021-03-21 15:18:38 +01:00
"properties" : { "table" : { "type" : "string" , "description" : "File path, relative to the Behavior Pack's path, to the loot table file" } }
2020-11-01 17:22:42 +01:00
} ,
2021-03-21 15:18:38 +01:00
"swing" : { "type" : "boolean" , "default" : false , "description" : "If true, the player will do the 'swing' animation when interacting with this entity" } ,
"transform_to_item" : { "type" : "string" , "description" : "The item used will transform to this item upon successful interaction. Format: itemName:auxValue" } ,
"use_item" : { "type" : "boolean" , "default" : false , "description" : "If true, the interaction will use an item" }
2020-11-01 17:22:42 +01:00
}
}
} ,
"anyOf" : [
{ "type" : "object" , "$ref" : "#/definitions/interact_object" } ,
{ "type" : "array" , "items" : { "$ref" : "#/definitions/interact_object" } }
]
}