author | ms.author | title | description | ms.service |
---|---|---|---|---|
JimSeaman42 |
mikeam |
Entity Documentation - minecraft:transformation |
A reference document detailing the 'transformation' entity component |
minecraft-bedrock-edition |
minecraft:transformation
defines an entity's transformation from the current definition into another.
Name | Default Value | Type | Description |
---|---|---|---|
add | not set | JSON Object | List of components to add to the entity after the transformation |
begin_transform_sound | not set | String | Sound to play when the transformation starts |
drop_equipment | False | Boolean | Cause the entity to drop all equipment upon transformation |
drop_inventory | False | Boolean | Cause the entity to drop all items in inventory upon transformation |
into | not set | String | |
keep_level | False | Boolean | If the entity has trades and has leveled up, it should maintain that level after transformation. |
keep_owner | False | Boolean | If the entity is owned by another entity, it should remain owned after transformation. |
preserve_equipment | False | Boolean | Causes the entity to keep equipment after going through transformation |
transformation_sound | not set | String | Sound to play when the entity is done transforming |
delay | not set | JSON Object | Defines the properties of the delay for the transformation |
delay
is a JSON Object defined by six parameters. Each item has the following properties:
Name | Default Value | Type | Description |
---|---|---|---|
block_assist_chance | 0.0 | Decimal | 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 | 0 | Decimal | Chance that, once a block is found, will help speed up the transformation |
block_max | 0 | Integer | 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 | 0 | Integer | Distance in Blocks that the entity will search for blocks that can help the transformation |
block_types | not set | List | List of blocks that can help the transformation of this entity |
range_max | 0 | Decimal | Time in seconds to be added to have the maximum random time until the entity transforms (if non-zero, the time in seconds before the entity transforms will be a random decimal between 'value+range_min' and 'value+range_max') |
range_min | 0 | Decimal | Time in seconds to be added to have the minimum random time until the entity transforms (if non-zero, the time in seconds before the entity transforms will be a random decimal between 'value+range_min' and 'value+range_max') |
value | 0 | Decimal | Time in seconds before the entity transforms |
"minecraft:transformation": {
"into": "minecraft:drowned<minecraft:as_adult>",
"transformation_sound": "convert_to_drowned",
"drop_equipment": false,
"drop_inventory": false,
"keep_level": false,
"delay": {
"block_assist_chance": 0.0,
"block_radius": 0,
"block_max": 0,
"value": 10
}
}
"minecraft:transformation": {
"into": "minecraft:zombie_pigman",
"transformation_sound" : "converted_to_zombified",
"keep_level": true,
"drop_inventory": true,
"preserve_equipment": true
}