Files
minecraft-bedrock-json-schemas/source/behavior/items/format/components/weapon.json
DW623 d3a8c7a4a4 Add Item Examples (#182)
Add Examples to Item Components from MS-Learn Website
2023-08-17 20:04:39 +02:00

41 lines
1.8 KiB
JSON

{
"$id": "blockception.minecraft.behavior.items.minecraft:weapon",
"title": "Weapon",
"description": "Weapon Item Component. Added to every weapon item such as axe, sword, trident, bow, crossbow.",
"type": "object",
"additionalProperties": false,
"properties": {
"on_hit_block": {
"title": "On Hit Block",
"description": "Trigger for letting you know when this item is used to hit a block.",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["self"] }
},
"on_hurt_entity": {
"title": "On Hurt Entity",
"description": "Trigger for letting you know when this item is used to hurt another mob.",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["self", "holder"] }
},
"on_not_hurt_entity": {
"title": "On Not Hurt Entity",
"description": "Trigger for letting you know when this item hit another actor, but didn't do damage.",
"type": "object",
"additionalProperties": false,
"event": { "type": "string", "title": "Event", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
"target": { "type": "string", "title": "Target", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED", "enum": ["self"] }
}
},
"examples": [
{
"on_hit_block" : "my_event:block_hit",
"on_hurt_entity" : "my_event:ouch",
"on_not_hurt_entity" : "my_event:panic"
}
]
}