minecraft:transformation
Defines an entity's transformation from the current definition into another
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
into | Text | — | Entity Definition that this entity will transform into |
begin_transform_sound | List of text | [] | Sound to play when the transformation starts |
transformation_sound | List of text | [] | Sound to play when the entity is done transforming |
drop_equipment | Boolean | false | Cause the entity to drop all equipment upon transformation |
drop_inventory | Boolean | false | Cause the entity to drop all items in inventory upon transformation |
preserve_equipment | Boolean | false | Cause the entity to keep equipment after going through transformation |
keep_owner | Boolean | false | If this entity is owned by another entity, it should remain owned after transformation. |
keep_level | Boolean | false | If this entity has trades and has leveled up, it should maintain that level after transformation. |
add | Object | {"component_groups": []} | List of components to add to the entity after the transformation |
component_groups | List of text | [] | Names of component groups to add |
delay | Object | {"block_assist_chance": 0, "block_chance": 0, "block_max"… | Defines the properties of the delay for the transformation |
value | Decimalmin 0 | 0 | Time in seconds before the entity transforms |
range_min | Decimal | 0 | Time in seconds to be added to value to have the minimum random time range value until the entity transforms (if non-zero then the time in seconds before the entity transforms will be random between value+range_min and value+range_max) |
range_max | Decimal | 0 | Time in seconds to be added to value to have the maximum random time range value until the entity transforms (if non-zero then the time in seconds before the entity transforms will be random between value+range_min and value+range_max) |
block_assist_chance | Decimal0 to 1 | 0 | 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_radius | Integermin 0 | 0 | Distance in Blocks that the entity will search for blocks that can help the transformation |
block_max | Integermin 0 | 0 | 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_chance | Decimal0 to 1 | 0 | Chance that, once a block is found, will help speed up the transformation |
block_types | List of text | [] | List of blocks that can help the transformation of this entity |
Example from the game files
This is how vanilla Zombie Villager uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:transformation": {
"begin_transform_sound": "remedy",
"keep_level": true,
"delay": {
"block_assist_chance": 0.01,
"block_radius": 4,
"block_chance": 0.3,
"range_max": 200,
"block_types": [
"minecraft:bed",
"minecraft:iron_bars"
],
"range_min": 80,
"value": 100
},
"drop_equipment": true,
"into": "minecraft:villager_v2",
"transformation_sound": "unfect"
}
}Used by 14
Vanilla entities with minecraft:transformation in their definition: