From ab8d5e065060b2236434be198a0440c4e15c67f2 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Tue, 5 Jan 2021 00:37:18 +0100 Subject: [PATCH] Added items events --- behaviour/items/1.16.100/events.json | 96 +++++++++++++++++++ .../items/1.16.100/events/add_mob_effect.json | 33 +++++++ behaviour/items/1.16.100/events/damage.json | 21 ++++ .../1.16.100/events/decrement_stack.json | 8 ++ .../1.16.100/events/remove_mob_effect.json | 23 +++++ behaviour/items/1.16.100/events/shoot.json | 25 +++++ behaviour/items/1.16.100/events/swing.json | 8 ++ behaviour/items/1.16.100/events/teleport.json | 26 +++++ .../items/1.16.100/events/transform_item.json | 15 +++ behaviour/items/1.16.100/items.json | 7 +- behaviour/items/1.16.200/events.json | 96 +++++++++++++++++++ .../items/1.16.200/events/add_mob_effect.json | 33 +++++++ behaviour/items/1.16.200/events/damage.json | 21 ++++ .../1.16.200/events/decrement_stack.json | 8 ++ .../1.16.200/events/remove_mob_effect.json | 23 +++++ behaviour/items/1.16.200/events/shoot.json | 25 +++++ behaviour/items/1.16.200/events/swing.json | 8 ++ behaviour/items/1.16.200/events/teleport.json | 26 +++++ .../items/1.16.200/events/transform_item.json | 15 +++ behaviour/items/1.16.200/items.json | 7 +- behaviour/items/items.json | 2 +- 21 files changed, 523 insertions(+), 3 deletions(-) create mode 100644 behaviour/items/1.16.100/events.json create mode 100644 behaviour/items/1.16.100/events/add_mob_effect.json create mode 100644 behaviour/items/1.16.100/events/damage.json create mode 100644 behaviour/items/1.16.100/events/decrement_stack.json create mode 100644 behaviour/items/1.16.100/events/remove_mob_effect.json create mode 100644 behaviour/items/1.16.100/events/shoot.json create mode 100644 behaviour/items/1.16.100/events/swing.json create mode 100644 behaviour/items/1.16.100/events/teleport.json create mode 100644 behaviour/items/1.16.100/events/transform_item.json create mode 100644 behaviour/items/1.16.200/events.json create mode 100644 behaviour/items/1.16.200/events/add_mob_effect.json create mode 100644 behaviour/items/1.16.200/events/damage.json create mode 100644 behaviour/items/1.16.200/events/decrement_stack.json create mode 100644 behaviour/items/1.16.200/events/remove_mob_effect.json create mode 100644 behaviour/items/1.16.200/events/shoot.json create mode 100644 behaviour/items/1.16.200/events/swing.json create mode 100644 behaviour/items/1.16.200/events/teleport.json create mode 100644 behaviour/items/1.16.200/events/transform_item.json diff --git a/behaviour/items/1.16.100/events.json b/behaviour/items/1.16.100/events.json new file mode 100644 index 00000000..ee58a934 --- /dev/null +++ b/behaviour/items/1.16.100/events.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events", + "title": "Events", + "description": "UNDOCUMENTATED", + "type": "object", + "properties": { + "on_consume": { + "$ref": "#/definitions/event_base" + } + }, + "additionalProperties": { + "$ref": "#/definitions/event_base" + }, + "definitions": { + "event_base": { + "title": "Event", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "$ref": "#/definitions/event_functions", + "properties": { + "sequence": { + "title": "Sequence", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "title": "Sequence", + "description": "UNDOCUMENTATED", + "type": "object", + "$ref": "#/definitions/event_functions" + } + }, + "randomize": { + "title": "Randomize", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "title": "Randomize", + "description": "UNDOCUMENTATED", + "type": "object", + "$ref": "#/definitions/event_functions", + "required": ["weight"], + "properties": { + "weight": { + "title": "Weight", + "description": "UNDOCUMENTATED", + "type": "integer", + "minimum": 0 + } + } + } + }, + "run_command": { + "title": "Run command", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "command": { + "title": "Command", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "type": "string", + "title": "Command", + "description": "UNDOCUMENTATED" + } + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": ["other"] + } + } + } + } + }, + "event_functions": { + "title": "Event", + "description": "UNDOCUMENTATED", + "type": "object", + "properties": { + "add_mob_effect": { "$ref": "./events/add_mob_effect.json" }, + "damage": { "$ref": "./events/damage.json" }, + "decrement_stack": { "$ref": "./events/decrement_stack.json" }, + "remove_mob_effect": { "$ref": "./events/remove_mob_effect.json" }, + "shoot": { "$ref": "./events/shoot.json" }, + "swing": { "$ref": "./events/swing.json" }, + "teleport": { "$ref": "./events/teleport.json" }, + "transform_item": { "$ref": "./events/transform_item.json" } + } + } + } +} diff --git a/behaviour/items/1.16.100/events/add_mob_effect.json b/behaviour/items/1.16.100/events/add_mob_effect.json new file mode 100644 index 00000000..b33f8127 --- /dev/null +++ b/behaviour/items/1.16.100/events/add_mob_effect.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.add_mob_effect", + "title": "Add mob effect", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "effect": { + "type": "string", + "title": "Effect", + "description": "UNDOCUMENTATED" + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": [ + "holder" + ] + }, + "duration": { + "type": "number", + "title": "Duration", + "description": "UNDOCUMENTATED" + }, + "amplifier": { + "type": "number", + "title": "Amplifier", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/damage.json b/behaviour/items/1.16.100/events/damage.json new file mode 100644 index 00000000..ba93de60 --- /dev/null +++ b/behaviour/items/1.16.100/events/damage.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.shoot", + "title": "Shoot", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "title": "Type", + "description": "UNDOCUMENTATED", + "enum": [ "magic" ] + }, + "amount": { + "type": "number", + "title": "Amount", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/decrement_stack.json b/behaviour/items/1.16.100/events/decrement_stack.json new file mode 100644 index 00000000..5e68e0c0 --- /dev/null +++ b/behaviour/items/1.16.100/events/decrement_stack.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.decrement_stack", + "title": "Decrement stack", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/remove_mob_effect.json b/behaviour/items/1.16.100/events/remove_mob_effect.json new file mode 100644 index 00000000..e7a9b72d --- /dev/null +++ b/behaviour/items/1.16.100/events/remove_mob_effect.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.remove_mob_effect", + "title": "Remove mob effect", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "effect": { + "type": "string", + "title": "Effect", + "description": "UNDOCUMENTATED" + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": [ + "holder" + ] + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/shoot.json b/behaviour/items/1.16.100/events/shoot.json new file mode 100644 index 00000000..4a2bb6a5 --- /dev/null +++ b/behaviour/items/1.16.100/events/shoot.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.shoot", + "title": "Shoot", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "angle_offset": { + "type": "number", + "title": "Angle offset", + "description": "UNDOCUMENTATED" + }, + "launch_power": { + "type": "number", + "title": "Launch power", + "description": "UNDOCUMENTATED" + }, + "projectile": { + "type": "string", + "title": "Projectile", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/swing.json b/behaviour/items/1.16.100/events/swing.json new file mode 100644 index 00000000..40cf43b8 --- /dev/null +++ b/behaviour/items/1.16.100/events/swing.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.swing", + "title": "Swing", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/events/teleport.json b/behaviour/items/1.16.100/events/teleport.json new file mode 100644 index 00000000..a42c3f45 --- /dev/null +++ b/behaviour/items/1.16.100/events/teleport.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.teleport", + "title": "Teleport", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": ["holder"] + }, + "max_range": { + "type": "array", + "title": "Max range", + "description": "UNDOCUMENTATED", + "items": [ + { "type": "number", "title": "X", "description": "UNDOCUMENTATED" }, + { "type": "number", "title": "Y", "description": "UNDOCUMENTATED" }, + { "type": "number", "title": "Z", "description": "UNDOCUMENTATED" } + ] + } + } +} diff --git a/behaviour/items/1.16.100/events/transform_item.json b/behaviour/items/1.16.100/events/transform_item.json new file mode 100644 index 00000000..d0752577 --- /dev/null +++ b/behaviour/items/1.16.100/events/transform_item.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.100.items.events.transform_item", + "title": "Transform item", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "transform": { + "title": "Transform", + "description": "UNDOCUMENTATED", + "type": "string" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.100/items.json b/behaviour/items/1.16.100/items.json index b3e5b2ad..3e7a5f30 100644 --- a/behaviour/items/1.16.100/items.json +++ b/behaviour/items/1.16.100/items.json @@ -44,7 +44,9 @@ } }, "components": { - "additionalProperties": false, + "additionalProperties": { + "type": "object" + }, "type": "object", "description": "The components of this item", "properties": { @@ -69,6 +71,9 @@ "minecraft:weapon": { "$ref": "./components/minecraft.weapon.json" }, "minecraft:wearable": { "$ref": "./components/minecraft.wearable.json" } } + }, + "events": { + "$ref": "./events.json" } } } diff --git a/behaviour/items/1.16.200/events.json b/behaviour/items/1.16.200/events.json new file mode 100644 index 00000000..c0bb23f4 --- /dev/null +++ b/behaviour/items/1.16.200/events.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events", + "title": "Events", + "description": "UNDOCUMENTATED", + "type": "object", + "properties": { + "on_consume": { + "$ref": "#/definitions/event_base" + } + }, + "additionalProperties": { + "$ref": "#/definitions/event_base" + }, + "definitions": { + "event_base": { + "title": "Event", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "$ref": "#/definitions/event_functions", + "properties": { + "sequence": { + "title": "Sequence", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "title": "Sequence", + "description": "UNDOCUMENTATED", + "type": "object", + "$ref": "#/definitions/event_functions" + } + }, + "randomize": { + "title": "Randomize", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "title": "Randomize", + "description": "UNDOCUMENTATED", + "type": "object", + "$ref": "#/definitions/event_functions", + "required": ["weight"], + "properties": { + "weight": { + "title": "Weight", + "description": "UNDOCUMENTATED", + "type": "integer", + "minimum": 0 + } + } + } + }, + "run_command": { + "title": "Run command", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "command": { + "title": "Command", + "description": "UNDOCUMENTATED", + "type": "array", + "items": { + "type": "string", + "title": "Command", + "description": "UNDOCUMENTATED" + } + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": ["other"] + } + } + } + } + }, + "event_functions": { + "title": "Event", + "description": "UNDOCUMENTATED", + "type": "object", + "properties": { + "add_mob_effect": { "$ref": "./events/add_mob_effect.json" }, + "damage": { "$ref": "./events/damage.json" }, + "decrement_stack": { "$ref": "./events/decrement_stack.json" }, + "remove_mob_effect": { "$ref": "./events/remove_mob_effect.json" }, + "shoot": { "$ref": "./events/shoot.json" }, + "swing": { "$ref": "./events/swing.json" }, + "teleport": { "$ref": "./events/teleport.json" }, + "transform_item": { "$ref": "./events/transform_item.json" } + } + } + } +} diff --git a/behaviour/items/1.16.200/events/add_mob_effect.json b/behaviour/items/1.16.200/events/add_mob_effect.json new file mode 100644 index 00000000..810cec7d --- /dev/null +++ b/behaviour/items/1.16.200/events/add_mob_effect.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.add_mob_effect", + "title": "Add mob effect", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "effect": { + "type": "string", + "title": "Effect", + "description": "UNDOCUMENTATED" + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": [ + "holder" + ] + }, + "duration": { + "type": "number", + "title": "Duration", + "description": "UNDOCUMENTATED" + }, + "amplifier": { + "type": "number", + "title": "Amplifier", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/damage.json b/behaviour/items/1.16.200/events/damage.json new file mode 100644 index 00000000..227a9a0e --- /dev/null +++ b/behaviour/items/1.16.200/events/damage.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.shoot", + "title": "Shoot", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "title": "Type", + "description": "UNDOCUMENTATED", + "enum": [ "magic" ] + }, + "amount": { + "type": "number", + "title": "Amount", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/decrement_stack.json b/behaviour/items/1.16.200/events/decrement_stack.json new file mode 100644 index 00000000..dd8a863b --- /dev/null +++ b/behaviour/items/1.16.200/events/decrement_stack.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.decrement_stack", + "title": "Decrement stack", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/remove_mob_effect.json b/behaviour/items/1.16.200/events/remove_mob_effect.json new file mode 100644 index 00000000..039446e7 --- /dev/null +++ b/behaviour/items/1.16.200/events/remove_mob_effect.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.remove_mob_effect", + "title": "Remove mob effect", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "effect": { + "type": "string", + "title": "Effect", + "description": "UNDOCUMENTATED" + }, + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": [ + "holder" + ] + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/shoot.json b/behaviour/items/1.16.200/events/shoot.json new file mode 100644 index 00000000..d98d95d2 --- /dev/null +++ b/behaviour/items/1.16.200/events/shoot.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.shoot", + "title": "Shoot", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "angle_offset": { + "type": "number", + "title": "Angle offset", + "description": "UNDOCUMENTATED" + }, + "launch_power": { + "type": "number", + "title": "Launch power", + "description": "UNDOCUMENTATED" + }, + "projectile": { + "type": "string", + "title": "Projectile", + "description": "UNDOCUMENTATED" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/swing.json b/behaviour/items/1.16.200/events/swing.json new file mode 100644 index 00000000..79273c43 --- /dev/null +++ b/behaviour/items/1.16.200/events/swing.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.swing", + "title": "Swing", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/events/teleport.json b/behaviour/items/1.16.200/events/teleport.json new file mode 100644 index 00000000..5b6b7600 --- /dev/null +++ b/behaviour/items/1.16.200/events/teleport.json @@ -0,0 +1,26 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.teleport", + "title": "Teleport", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "target": { + "type": "string", + "title": "Target", + "description": "UNDOCUMENTATED", + "enum": ["holder"] + }, + "max_range": { + "type": "array", + "title": "Max range", + "description": "UNDOCUMENTATED", + "items": [ + { "type": "number", "title": "X", "description": "UNDOCUMENTATED" }, + { "type": "number", "title": "Y", "description": "UNDOCUMENTATED" }, + { "type": "number", "title": "Z", "description": "UNDOCUMENTATED" } + ] + } + } +} diff --git a/behaviour/items/1.16.200/events/transform_item.json b/behaviour/items/1.16.200/events/transform_item.json new file mode 100644 index 00000000..92eaa5b0 --- /dev/null +++ b/behaviour/items/1.16.200/events/transform_item.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.1.16.200.items.events.transform_item", + "title": "Transform item", + "description": "UNDOCUMENTATED", + "type": "object", + "additionalProperties": false, + "properties": { + "transform": { + "title": "Transform", + "description": "UNDOCUMENTATED", + "type": "string" + } + } +} \ No newline at end of file diff --git a/behaviour/items/1.16.200/items.json b/behaviour/items/1.16.200/items.json index e8d9c0ed..89770d9d 100644 --- a/behaviour/items/1.16.200/items.json +++ b/behaviour/items/1.16.200/items.json @@ -44,7 +44,9 @@ } }, "components": { - "additionalProperties": false, + "additionalProperties": { + "type": "object" + }, "type": "object", "description": "The components of this item", "properties": { @@ -69,6 +71,9 @@ "minecraft:weapon": { "$ref": "./components/minecraft.weapon.json" }, "minecraft:wearable": { "$ref": "./components/minecraft.wearable.json" } } + }, + "events": { + "$ref": "./events.json" } } } diff --git a/behaviour/items/items.json b/behaviour/items/items.json index d3fe07fc..04aadbea 100644 --- a/behaviour/items/items.json +++ b/behaviour/items/items.json @@ -3,7 +3,7 @@ "$id": "blockception.minecraft.behaviour.items", "examples": [ { - "format_version": "1.16.0", + "format_version": "1.16.200", "minecraft:item": { "description": { "identifier": "namespace:item"