2022-10-29 16:13:50 +02:00
|
|
|
{
|
|
|
|
|
"$id": "blockception.minecraft.behavior.entities.events",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"title": "Events",
|
|
|
|
|
"description": "Events for entities.",
|
|
|
|
|
"additionalProperties": { "$ref": "#/definitions/event_base" },
|
|
|
|
|
"definitions": {
|
|
|
|
|
"addremove": {
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"title": "Add Or Remove",
|
|
|
|
|
"description": "The components groups to add or remove.",
|
|
|
|
|
"type": "object",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ { "component_groups": [ "self:variant1" ] } ],
|
2022-10-29 16:13:50 +02:00
|
|
|
"properties": {
|
|
|
|
|
"component_groups": {
|
|
|
|
|
"title": "Component Groups",
|
|
|
|
|
"description": "The components groups to add or remove.",
|
2025-03-03 12:44:05 +05:00
|
|
|
"anyOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": { "type": "string", "description": "A reference to a component group.", "title": "Component Groups" }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "string", "description": "A reference to a component group.", "title": "Component Groups"
|
|
|
|
|
}
|
|
|
|
|
]
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"event_base": {
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"type": "object",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ { }, { "add": { "component_groups": [ ] } }, { "remove": { "component_groups": [ ] } } ],
|
2022-10-29 16:13:50 +02:00
|
|
|
"defaultSnippets": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "label": "New Add Event", "body": { "add": { "component_groups": [ "$1" ] } } },
|
|
|
|
|
{ "label": "New Remove Event", "body": { "remove": { "component_groups": [ "$1" ] } } },
|
2022-10-29 16:13:50 +02:00
|
|
|
{
|
|
|
|
|
"label": "New Random Event",
|
|
|
|
|
"body": {
|
|
|
|
|
"randomize": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "add": { "component_groups": [ "$1" ] }, "weight": 1 },
|
|
|
|
|
{ "add": { "component_groups": [ "$2" ] }, "weight": 1 }
|
2022-10-29 16:13:50 +02:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "New Sequence Events",
|
|
|
|
|
"body": {
|
2024-11-18 19:33:19 +05:00
|
|
|
"sequence": [ { "add": { "component_groups": [ "$1" ] } }, { "add": { "component_groups": [ "$2" ] } } ]
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"filters": { "$ref": "./../filters/filters.json" },
|
|
|
|
|
"trigger": {
|
|
|
|
|
"description": "Triggers additional events.",
|
|
|
|
|
"$comment": "UNDOCUMENTED",
|
|
|
|
|
"title": "Trigger",
|
|
|
|
|
"$ref": "./types/trigger.json"
|
|
|
|
|
},
|
|
|
|
|
"add": {
|
|
|
|
|
"$ref": "#/definitions/addremove",
|
|
|
|
|
"description": "What gets added when the event gets triggered.",
|
|
|
|
|
"title": "Add"
|
|
|
|
|
},
|
|
|
|
|
"remove": {
|
|
|
|
|
"$ref": "#/definitions/addremove",
|
|
|
|
|
"description": "What gets removed when the event gets triggered.",
|
|
|
|
|
"title": "Remove"
|
|
|
|
|
},
|
|
|
|
|
"randomize": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"description": "Randomly selects one of the following items based upon their weight and the total weights.",
|
|
|
|
|
"title": "Randomize",
|
|
|
|
|
"items": {
|
|
|
|
|
"description": "Randomly selects one of the following items based upon their weight and the total weights.",
|
|
|
|
|
"title": "Randomize",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ { "add": { "component_groups": [ "foo:example" ] }, "weight": 1 } ],
|
2024-04-01 13:56:29 +05:00
|
|
|
"$ref": "#/definitions/weighted_event_base"
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"sequence": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"description": "A series of filters and components to be added.",
|
|
|
|
|
"title": "Sequences",
|
|
|
|
|
"items": {
|
|
|
|
|
"description": "Filters and components to be added.",
|
|
|
|
|
"title": "Sequence",
|
|
|
|
|
"type": "object",
|
2024-04-01 13:56:29 +05:00
|
|
|
"$ref": "#/definitions/event_base"
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-11-18 19:33:19 +05:00
|
|
|
"execute_event_on_home_block": {
|
|
|
|
|
"title": "Execute Event On Home Block",
|
|
|
|
|
"description": "Allows the entity to execute an event on the block at its home position",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": {
|
|
|
|
|
"event": {
|
|
|
|
|
"title": "Event",
|
|
|
|
|
"description": "The event to execute",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"reset_target": {
|
|
|
|
|
"title": "Reset Target",
|
|
|
|
|
"description": "Allows an entity to reset its target.",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": { }
|
|
|
|
|
},
|
2024-04-01 13:56:29 +05:00
|
|
|
"emit_vibration": {
|
|
|
|
|
"title": "Emit Vibration",
|
|
|
|
|
"description": "UNDOCUMENTED",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"vibration": {
|
|
|
|
|
"enum": [
|
|
|
|
|
"shear",
|
|
|
|
|
"entity_act",
|
|
|
|
|
"entity_interact"
|
|
|
|
|
]
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
2024-04-01 13:56:29 +05:00
|
|
|
},
|
|
|
|
|
"examples": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "vibration": "shear" },
|
|
|
|
|
{ "vibration": "entity_act" },
|
|
|
|
|
{ "vibration": "entity_interact" }
|
2024-04-01 13:56:29 +05:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"set_property": {
|
|
|
|
|
"title": "Set Property",
|
|
|
|
|
"description": "Sets a property on the entity.",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": {
|
|
|
|
|
"title": "Property",
|
2024-11-18 19:33:19 +05:00
|
|
|
"type": [ "string", "number", "integer", "boolean" ],
|
2024-04-01 13:56:29 +05:00
|
|
|
"description": "The value to set the property to.",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ false, 0, 0.0, "math.random(0, 10)" ]
|
2024-04-01 13:56:29 +05:00
|
|
|
},
|
|
|
|
|
"examples": [
|
|
|
|
|
{ "example:property": false },
|
|
|
|
|
{ "example:property": 0 },
|
|
|
|
|
{ "example:property": 0.0 },
|
|
|
|
|
{ "example:property": "one" },
|
|
|
|
|
{ "example:property": "math.random(0, 10)" }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
"queue_command": {
|
|
|
|
|
"description": "Queues a command to be executed.",
|
|
|
|
|
"properties": {
|
|
|
|
|
"command": {
|
|
|
|
|
"title": "Command",
|
|
|
|
|
"description": "The command to execute.",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"pattern": "^[^/].*$",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ "say Hello World" ]
|
2024-04-01 13:56:29 +05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "The command to execute.",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ "say Hello World" ],
|
2024-04-01 13:56:29 +05:00
|
|
|
"pattern": "^[^/].*$"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-12-05 20:54:27 +05:00
|
|
|
},
|
|
|
|
|
"play_sound": {
|
|
|
|
|
"title": "Play Sound",
|
|
|
|
|
"description": "Allows the owner entity to emit sounds",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": {
|
|
|
|
|
"sound": {
|
|
|
|
|
"title": "Sound",
|
|
|
|
|
"description": "Specifies the sound event to play",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"emit_particle": {
|
|
|
|
|
"title": "Emit Particle",
|
|
|
|
|
"description": "Allowing particles to be emitted at the center of the entity's bounding box",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": {
|
|
|
|
|
"particle": {
|
|
|
|
|
"title": "Particle",
|
|
|
|
|
"description": "Specifies the type of particle to emit",
|
|
|
|
|
"type": "string"
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-03-03 12:44:05 +05:00
|
|
|
},
|
|
|
|
|
"stop_movement": {
|
|
|
|
|
"title": "Stop Movement",
|
|
|
|
|
"description": "Stops the entity's movement",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": {
|
|
|
|
|
"stop_vertical_movement": {
|
|
|
|
|
"title": "Stop Vertical Movement",
|
|
|
|
|
"description": "Specifies whether vertical movement should be stopped",
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false
|
|
|
|
|
},
|
|
|
|
|
"stop_horizontal_movement": {
|
|
|
|
|
"title": "Stop Horizontal Movement",
|
|
|
|
|
"description": "Specifies whether horizontal movement should be stopped",
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
"default": false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"set_home_position": {
|
|
|
|
|
"title": "Set Home Position",
|
|
|
|
|
"description": "Sets the entity's home position to its current position",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": { }
|
|
|
|
|
},
|
|
|
|
|
"first_valid": {
|
|
|
|
|
"title": "First Valid",
|
|
|
|
|
"description": "Will evaluate every filter in order and execute the first valid one",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"properties": { }
|
2024-04-01 13:56:29 +05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"weighted_event_base": {
|
|
|
|
|
"additionalProperties": false,
|
|
|
|
|
"type": "object",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ { }, { "add": { "component_groups": [ ] } }, { "remove": { "component_groups": [ ] } } ],
|
2024-04-01 13:56:29 +05:00
|
|
|
"defaultSnippets": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "label": "New Add Event", "body": { "add": { "component_groups": [ "$1" ] } } },
|
|
|
|
|
{ "label": "New Remove Event", "body": { "remove": { "component_groups": [ "$1" ] } } },
|
2024-04-01 13:56:29 +05:00
|
|
|
{
|
|
|
|
|
"label": "New Random Event",
|
|
|
|
|
"body": {
|
|
|
|
|
"randomize": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "add": { "component_groups": [ "$1" ] }, "weight": 1 },
|
|
|
|
|
{ "add": { "component_groups": [ "$2" ] }, "weight": 1 }
|
2024-04-01 13:56:29 +05:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"label": "New Sequence Events",
|
|
|
|
|
"body": {
|
2024-11-18 19:33:19 +05:00
|
|
|
"sequence": [ { "add": { "component_groups": [ "$1" ] } }, { "add": { "component_groups": [ "$2" ] } } ]
|
2024-04-01 13:56:29 +05:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"filters": { "$ref": "./../filters/filters.json" },
|
|
|
|
|
"trigger": {
|
|
|
|
|
"description": "Triggers additional events.",
|
|
|
|
|
"$comment": "UNDOCUMENTED",
|
|
|
|
|
"title": "Trigger",
|
|
|
|
|
"$ref": "./types/trigger.json"
|
|
|
|
|
},
|
|
|
|
|
"add": {
|
|
|
|
|
"$ref": "#/definitions/addremove",
|
|
|
|
|
"description": "What gets added when the event gets triggered.",
|
|
|
|
|
"title": "Add"
|
|
|
|
|
},
|
|
|
|
|
"remove": {
|
|
|
|
|
"$ref": "#/definitions/addremove",
|
|
|
|
|
"description": "What gets removed when the event gets triggered.",
|
|
|
|
|
"title": "Remove"
|
|
|
|
|
},
|
|
|
|
|
"randomize": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"description": "Randomly selects one of the following items based upon their weight and the total weights.",
|
|
|
|
|
"title": "Randomize",
|
|
|
|
|
"items": {
|
|
|
|
|
"description": "Randomly selects one of the following items based upon their weight and the total weights.",
|
|
|
|
|
"title": "Randomize",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ { "add": { "component_groups": [ "foo:example" ] }, "weight": 1 } ],
|
2024-04-01 13:56:29 +05:00
|
|
|
"$ref": "#/definitions/weighted_event_base"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"sequence": {
|
|
|
|
|
"type": "array",
|
|
|
|
|
"description": "A series of filters and components to be added.",
|
|
|
|
|
"title": "Sequences",
|
|
|
|
|
"items": {
|
|
|
|
|
"description": "Filters and components to be added.",
|
|
|
|
|
"title": "Sequence",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"$ref": "#/definitions/event_base"
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
|
|
|
|
},
|
2024-02-11 16:05:56 +05:00
|
|
|
"emit_vibration": {
|
|
|
|
|
"title": "Emit Vibration",
|
|
|
|
|
"description": "UNDOCUMENTED",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"properties": {
|
|
|
|
|
"vibration": {
|
|
|
|
|
"enum": [
|
|
|
|
|
"shear",
|
|
|
|
|
"entity_act",
|
|
|
|
|
"entity_interact"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"examples": [
|
2024-11-18 19:33:19 +05:00
|
|
|
{ "vibration": "shear" },
|
|
|
|
|
{ "vibration": "entity_act" },
|
|
|
|
|
{ "vibration": "entity_interact" }
|
2024-02-11 16:05:56 +05:00
|
|
|
]
|
|
|
|
|
},
|
2022-10-29 16:13:50 +02:00
|
|
|
"set_property": {
|
|
|
|
|
"title": "Set Property",
|
|
|
|
|
"description": "Sets a property on the entity.",
|
|
|
|
|
"type": "object",
|
|
|
|
|
"additionalProperties": {
|
|
|
|
|
"title": "Property",
|
2024-11-18 19:33:19 +05:00
|
|
|
"type": [ "string", "number", "integer", "boolean" ],
|
2023-04-22 16:00:43 +02:00
|
|
|
"description": "The value to set the property to.",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ false, 0, 0.0, "math.random(0, 10)" ]
|
2022-10-29 16:13:50 +02:00
|
|
|
},
|
|
|
|
|
"examples": [
|
|
|
|
|
{ "example:property": false },
|
|
|
|
|
{ "example:property": 0 },
|
|
|
|
|
{ "example:property": 0.0 },
|
2023-04-22 16:00:43 +02:00
|
|
|
{ "example:property": "one" },
|
|
|
|
|
{ "example:property": "math.random(0, 10)" }
|
2022-10-29 16:13:50 +02:00
|
|
|
]
|
2023-12-14 18:50:54 +01:00
|
|
|
},
|
|
|
|
|
"queue_command": {
|
|
|
|
|
"description": "Queues a command to be executed.",
|
|
|
|
|
"properties": {
|
|
|
|
|
"command": {
|
2023-12-14 19:56:40 +01:00
|
|
|
"title": "Command",
|
|
|
|
|
"description": "The command to execute.",
|
|
|
|
|
"oneOf": [
|
|
|
|
|
{
|
|
|
|
|
"type": "string",
|
|
|
|
|
"pattern": "^[^/].*$",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ "say Hello World" ]
|
2023-12-14 19:56:40 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "array",
|
|
|
|
|
"items": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"description": "The command to execute.",
|
2024-11-18 19:33:19 +05:00
|
|
|
"examples": [ "say Hello World" ],
|
2023-12-14 19:56:40 +01:00
|
|
|
"pattern": "^[^/].*$"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-12-14 18:50:54 +01:00
|
|
|
}
|
|
|
|
|
}
|
2024-04-01 13:56:29 +05:00
|
|
|
},
|
|
|
|
|
"weight": {
|
|
|
|
|
"type": "number",
|
|
|
|
|
"default": 1,
|
|
|
|
|
"minimum": 1,
|
|
|
|
|
"description": "The weight on how likely this section is to trigger.",
|
|
|
|
|
"$comment": "UNDOCUMENTED",
|
|
|
|
|
"title": "Weight"
|
2022-10-29 16:13:50 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"minecraft:entity_transformed": {
|
|
|
|
|
"description": "Event called on an entity that transforms into another entity.",
|
|
|
|
|
"$ref": "#/definitions/event_base",
|
|
|
|
|
"title": "Entity Transformed"
|
|
|
|
|
},
|
|
|
|
|
"minecraft:entity_born": {
|
|
|
|
|
"description": "Event called on an entity that is spawned through two entities breeding.",
|
|
|
|
|
"$ref": "#/definitions/event_base",
|
|
|
|
|
"title": "Entity Born"
|
|
|
|
|
},
|
|
|
|
|
"minecraft:entity_spawned": {
|
|
|
|
|
"description": "Event called on an entity that is placed in the level.",
|
|
|
|
|
"$ref": "#/definitions/event_base",
|
|
|
|
|
"title": "Entity Spawned"
|
|
|
|
|
},
|
|
|
|
|
"minecraft:on_prime": {
|
|
|
|
|
"description": "Event called on an entity whose fuse is lit and is ready to explode.",
|
|
|
|
|
"$ref": "#/definitions/event_base",
|
|
|
|
|
"title": "On Prime"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|