Files
minecraft-bedrock-json-schemas/source/behavior/entities/format/components/transformation.json

130 lines
4.3 KiB
JSON
Raw Normal View History

2021-10-08 12:59:03 +02:00
{
2021-10-08 13:04:13 +02:00
"$id": "blockception.minecraft.behavior.entities.minecraft.transformation",
"description": "Defines an entity's transformation from the current definition into another",
2021-10-08 12:59:03 +02:00
"type": "object",
2021-10-08 13:04:13 +02:00
"title": "Transformation",
2021-10-08 12:59:03 +02:00
"additionalProperties": false,
"properties": {
"add": {
"type": "object",
2022-07-22 19:41:04 +02:00
"description": "List of components to add to the entity after the transformation.",
2021-10-08 12:59:03 +02:00
"title": "Add",
2021-10-11 18:10:42 +02:00
"additionalProperties": false,
"properties": {
"component_groups": {
"type": "array",
2022-07-22 19:41:04 +02:00
"description": "Names of component groups to add.",
2021-10-11 18:10:42 +02:00
"items": {
"type": "string"
}
}
}
},
"begin_transform_sound": {
"$ref": "../../../../general/sound_event.json",
2022-07-22 19:41:04 +02:00
"description": "Sound to play when the transformation starts.",
2021-10-11 18:10:42 +02:00
"title": "Begin Transform Sound"
2021-10-08 12:59:03 +02:00
},
"delay": {
2022-07-22 19:41:04 +02:00
"description": "Defines the properties of the delay for the transformation.",
2021-10-08 12:59:03 +02:00
"title": "Delay",
"oneOf": [
{ "type": "number" },
{
"type": "object",
"properties": {
"block_assist_chance": {
"type": "number",
"default": 0,
"description": "Chance that the entity will look for nearby blocks that can speed up the transformation. Value must be between 0.0 and 1.0"
},
"block_chance": {
"type": "number",
"default": 0,
2022-07-22 19:41:04 +02:00
"description": "Chance that, once a block is found, will help speed up the transformation."
2021-10-08 12:59:03 +02:00
},
"block_max": {
"type": "integer",
"default": 0,
"description": "Maximum number of blocks the entity will look for to aid in the transformation. If not defined or set to 0, it will be set to the block radius"
},
"block_radius": {
"type": "integer",
"default": 0,
2022-07-22 19:41:04 +02:00
"description": "Distance in Blocks that the entity will search for blocks that can help the transformation."
2021-10-08 12:59:03 +02:00
},
"block_types": {
"type": "array",
2022-07-22 19:41:04 +02:00
"description": "List of blocks that can help the transformation of this entity.",
2021-10-11 18:10:42 +02:00
"items": {
"$ref": "../../../../general/block/identifier.json"
}
2021-10-08 12:59:03 +02:00
},
2021-10-11 18:10:42 +02:00
"value": {
"type": "number",
"default": 0,
2022-07-22 19:41:04 +02:00
"description": "Time in seconds before the entity transforms."
2021-10-11 18:10:42 +02:00
}
2021-10-08 12:59:03 +02:00
}
}
]
},
"drop_equipment": {
"type": "boolean",
"default": false,
2022-07-22 19:41:04 +02:00
"description": "Cause the entity to drop all equipment upon transformation.",
2021-10-08 12:59:03 +02:00
"title": "Drop Equipment"
},
"drop_inventory": {
"type": "boolean",
"default": false,
2022-07-22 19:41:04 +02:00
"description": "Cause the entity to drop all items in inventory upon transformation.",
2021-10-08 12:59:03 +02:00
"title": "Drop Inventory"
},
2021-10-11 18:10:42 +02:00
"into": {
"type": "string",
"default": "",
2022-07-22 19:41:04 +02:00
"description": "Entity Definition that this entity will transform into.",
2024-03-23 08:01:59 +01:00
"title": "Into",
"examples": ["minecraft:drowned<minecraft:as_baby>", "minecraft:drowned"]
2021-10-11 18:10:42 +02:00
},
2021-10-08 12:59:03 +02:00
"keep_level": {
"type": "boolean",
"default": false,
"description": "If this entity has trades and has leveled up, it should maintain that level after transformation.",
"title": "Keep Level"
},
"keep_owner": {
"type": "boolean",
"default": false,
"description": "If this entity is owned by another entity, it should remain owned after transformation.",
"title": "Keep Owner"
},
"preserve_equipment": {
"type": "boolean",
"default": false,
2022-07-22 19:41:04 +02:00
"description": "Cause the entity to keep equipment after going through transformation.",
2021-10-08 12:59:03 +02:00
"title": "Preserve Equipment"
},
"transformation_sound": {
"$ref": "../../../../general/sound_event.json",
2021-10-08 12:59:03 +02:00
"default": "",
2022-07-22 19:41:04 +02:00
"description": "Sound to play when the entity is done transforming.",
2021-10-08 12:59:03 +02:00
"title": "Transformation Sound"
}
2021-10-11 18:10:42 +02:00
},
"examples": [
{
"add": {},
"begin_transform_sound": "example",
"drop_equipment": false,
"drop_inventory": false,
"into": "",
"keep_level": false,
"keep_owner": false,
"preserve_equipment": false,
"transformation_sound": ""
}
]
2021-10-08 12:59:03 +02:00
}