2021-10-08 12:59:03 +02:00
{
2021-10-08 13:04:13 +02:00
"$id" : "blockception.minecraft.behavior.entities.minecraft.interact" ,
2021-10-08 12:59:03 +02:00
"type" : "object" ,
2021-10-08 13:04:13 +02:00
"title" : "Interact" ,
2021-10-08 12:59:03 +02:00
"description" : "Defines interactions with this entity." ,
"additionalProperties" : false ,
2022-02-09 13:33:20 +01:00
"examples" : [ { "interactions" : [ { } ] } ] ,
2021-10-08 12:59:03 +02:00
"definitions" : {
"interaction_spec" : {
"type" : "object" ,
2021-12-20 22:12:01 +01:00
"additionalProperties" : false ,
2021-10-08 12:59:03 +02:00
"properties" : {
"add_items" : {
2022-07-13 22:09:39 +01:00
"title" : "Add Items" ,
2021-10-08 12:59:03 +02:00
"type" : "object" ,
"description" : "Loot table with items to add to the player's inventory upon successful interaction." ,
"additionalProperties" : false ,
"properties" : {
"table" : {
"type" : "string" ,
"$ref" : "../../../../general/loot_table/identifier.json" ,
"description" : "File path, relative to the Behavior Pack's path, to the loot table file." ,
"title" : "Table"
}
}
} ,
"cooldown" : {
2022-07-13 22:09:39 +01:00
"title" : "Cooldown" ,
2021-10-08 12:59:03 +02:00
"type" : "number" ,
"default" : 0 ,
2022-06-07 23:20:52 +02:00
"description" : "Time in seconds before this entity can be interacted with again."
2021-10-08 12:59:03 +02:00
} ,
2022-07-13 22:09:39 +01:00
"admire" : {
"title" : "Admire" ,
"type" : "boolean" ,
"default" : false ,
"description" : "Allows entity to admire the item. Requires \"minecraft:admire_item\" and \"minecraft:behavior.admire_item\" to work." ,
"$comment" : "UNDOCUMENTED"
} ,
"barter" : {
"title" : "Barter" ,
"type" : "boolean" ,
"default" : false ,
"description" : "Allows entity to barter with the item. Requires \"minecraft:barter\" to work." ,
"$comment" : "UNDOCUMENTED"
} ,
2022-06-07 20:13:16 +02:00
"cooldown_after_being_attacked" : {
2022-07-13 22:09:39 +01:00
"title" : "Cooldown After Being Attacked" ,
2022-06-07 20:13:16 +02:00
"type" : "number" ,
2022-06-07 23:20:52 +02:00
"default" : 0 ,
"description" : "Time in seconds before this entity can be interacted with after being attacked."
2022-06-07 20:13:16 +02:00
} ,
2022-02-09 13:33:20 +01:00
"health_amount" : {
2022-07-13 22:09:39 +01:00
"title" : "Health Amount" ,
2022-06-07 23:20:52 +02:00
"type" : "integer" ,
2022-02-09 13:33:20 +01:00
"default" : 0 ,
2022-06-07 23:20:52 +02:00
"description" : "The amount of health this entity will recover or hurt when interacting with this item. Negative values will harm the entity."
2022-02-09 13:33:20 +01:00
} ,
2021-10-08 12:59:03 +02:00
"hurt_item" : {
2022-07-13 22:09:39 +01:00
"title" : "Hurt Item" ,
2021-10-08 12:59:03 +02:00
"type" : "integer" ,
"default" : 0 ,
2022-06-07 23:20:52 +02:00
"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."
2021-10-08 12:59:03 +02:00
} ,
"interact_text" : {
2022-07-13 22:09:39 +01:00
"title" : "Interact Text" ,
2021-10-08 12:59:03 +02:00
"type" : "string" ,
2022-06-07 23:20:52 +02:00
"description" : "Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls."
2021-10-08 12:59:03 +02:00
} ,
2021-10-11 18:10:42 +02:00
"on_interact" : {
2022-07-13 22:09:39 +01:00
"title" : "On Interact" ,
2021-10-11 18:10:42 +02:00
"$ref" : "../types/trigger.json" ,
2022-07-13 22:09:39 +01:00
"description" : "Event to fire when the interaction occurs."
2021-10-11 18:10:42 +02:00
} ,
2021-10-08 12:59:03 +02:00
"particle_on_start" : {
2022-07-13 22:09:39 +01:00
"title" : "Particle On Start" ,
2021-10-08 12:59:03 +02:00
"type" : "object" ,
"description" : "Particle effect that will be triggered at the start of the interaction." ,
"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"
} ,
2021-10-11 18:10:42 +02:00
"particle_type" : {
"type" : "string" ,
"description" : "The type of particle that will be spawned." ,
"title" : "Particle Type"
} ,
2021-10-08 12:59:03 +02:00
"particle_y_offset" : {
"type" : "number" ,
"description" : "Will offset the particle this amount in the y direction." ,
"title" : "Particle Y Offset"
}
}
} ,
"play_sounds" : {
2022-07-13 22:09:39 +01:00
"title" : "Play Sounds" ,
2022-10-02 21:51:03 +02:00
"$ref" : "../../../../general/sound_event.json" ,
2022-07-13 22:09:39 +01:00
"description" : "List of sounds to play when the interaction occurs."
2021-10-08 12:59:03 +02:00
} ,
"spawn_entities" : {
2022-07-13 22:09:39 +01:00
"title" : "Spawn Entities" ,
2021-10-08 12:59:03 +02:00
"type" : "string" ,
2022-07-13 22:09:39 +01:00
"description" : "List of entities to spawn when the interaction occurs."
2021-10-08 12:59:03 +02:00
} ,
"spawn_items" : {
"type" : "object" ,
"description" : "Loot table with items to drop on the ground upon successful interaction." ,
"title" : "Spawn Items" ,
"additionalProperties" : false ,
"properties" : {
"table" : {
"type" : "string" ,
"$ref" : "../../../../general/loot_table/identifier.json" ,
"description" : "File path, relative to the Behavior Pack's path, to the loot table file." ,
"title" : "Table"
}
}
} ,
"swing" : {
2022-07-13 22:09:39 +01:00
"title" : "Swing" ,
2021-10-08 12:59:03 +02:00
"type" : "boolean" ,
"default" : false ,
2022-07-22 19:43:23 +02:00
"description" : "If true, the player will do the \"swing\" animation when interacting with this entity."
2021-10-08 12:59:03 +02:00
} ,
"transform_to_item" : {
"title" : "Transform To Item" ,
2022-07-13 22:09:39 +01:00
"type" : "string" ,
2021-10-08 12:59:03 +02:00
"description" : "The feed item used will transform to this item upon successful interaction. Format: itemName:auxValue"
} ,
2021-10-11 18:10:42 +02:00
"use_item" : {
2022-07-13 22:09:39 +01:00
"title" : "Use Item" ,
2021-10-11 18:10:42 +02:00
"type" : "boolean" ,
"default" : false ,
2022-07-13 22:09:39 +01:00
"description" : "If true, the interaction will use an item."
2022-03-10 16:53:03 -06:00
} ,
2022-06-07 20:13:16 +02:00
"vibration" : {
"title" : "Vibration" ,
"type" : "string" ,
2024-12-05 20:54:27 +05:00
"default" : "entity_interact" ,
"description" : "Vibration to emit when the interaction occurs. Admitted values are none (no vibration emitted), shear, entity_die, entity_act, entity_interact." ,
"enum" : [ "none" , "shear" , "entity_die" , "entity_act" , "entity_interact" ]
2022-06-07 23:20:52 +02:00
} ,
"give_item" : {
"title" : "Give Item" ,
2022-07-13 22:09:39 +01:00
"type" : "boolean" ,
2022-06-07 23:20:52 +02:00
"$comment" : "UNDOCUMENTED" ,
"description" : "UNDOCUMENTED Item to give to the player upon successful interaction."
} ,
"take_item" : {
"title" : "Take Item" ,
2022-07-13 22:09:39 +01:00
"type" : "boolean" ,
2022-06-07 23:20:52 +02:00
"$comment" : "UNDOCUMENTED" ,
2022-07-22 19:41:04 +02:00
"description" : "UNDOCUMENTED Takes an item from the player."
2023-12-16 16:27:18 +01:00
} ,
"drop_item_slot" : {
"title" : "Drop Item Slot" ,
2024-04-20 12:31:26 +02:00
"type" : "string" ,
2024-04-29 18:22:36 +05:00
"examples" : [
"slot.armor.head" ,
"slot.armor.chest" ,
"slot.armor.legs" ,
"slot.armor.feet"
] ,
"description" : "The entity's equipment slot to remove and drop the item from, if any, upon successful interaction."
2023-12-16 16:27:18 +01:00
} ,
"equip_item_slot" : {
"title" : "Equip Item Slot" ,
2024-04-20 12:31:26 +02:00
"type" : "string" ,
2024-04-29 18:22:36 +05:00
"description" : "The entity's equipment slot to equip the item to, if any, upon successful interaction." ,
"examples" : [
"slot.armor.head" ,
"slot.armor.chest" ,
"slot.armor.legs" ,
"slot.armor.feet"
]
} ,
"repair_entity_item" : {
"title" : "Repair Entity Item" ,
"type" : "object" ,
"description" : "Allows to repair one of the entity's items." ,
"properties" : {
"amount" : {
"title" : "Amount" ,
"description" : "How much of the item durability should be restored upon interaction." ,
"type" : "integer" ,
"minimum" : 0
} ,
"slot" : {
"title" : "Slot" ,
"description" : "The entity's slot containing the item to be repaired." ,
"type" : "string" ,
"examples" : [
"slot.armor.head" ,
"slot.armor.chest" ,
"slot.armor.legs" ,
"slot.armor.feet"
]
}
}
2021-10-11 18:10:42 +02:00
}
2021-10-08 12:59:03 +02:00
}
}
} ,
"properties" : {
"interactions" : {
2022-07-22 19:41:04 +02:00
"description" : "The interactions." ,
2021-10-08 12:59:03 +02:00
"title" : "Interactions" ,
"oneOf" : [
2021-10-11 18:10:42 +02:00
{
"type" : "object" ,
"$ref" : "#/definitions/interaction_spec"
} ,
{
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/interaction_spec"
}
}
2021-10-08 12:59:03 +02:00
]
}
}
}