Added items events

This commit is contained in:
DaanV2
2021-01-05 00:37:18 +01:00
parent 436764358a
commit ab8d5e0650
21 changed files with 523 additions and 3 deletions

View File

@@ -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" }
}
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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
}

View File

@@ -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"
]
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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
}

View File

@@ -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" }
]
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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" }
}
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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
}

View File

@@ -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"
]
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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
}

View File

@@ -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" }
]
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"
}
}
}

View File

@@ -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"