minecraft:transformation

Defines an entity's transformation from the current definition into another

Properties

PropertyTypeDefaultWhat it does
intoText—Entity Definition that this entity will transform into
begin_transform_soundList of text[]Sound to play when the transformation starts
transformation_soundList of text[]Sound to play when the entity is done transforming
drop_equipmentBooleanfalseCause the entity to drop all equipment upon transformation
drop_inventoryBooleanfalseCause the entity to drop all items in inventory upon transformation
preserve_equipmentBooleanfalseCause the entity to keep equipment after going through transformation
keep_ownerBooleanfalseIf this entity is owned by another entity, it should remain owned after transformation.
keep_levelBooleanfalseIf this entity has trades and has leveled up, it should maintain that level after transformation.
addObject{"component_groups": []}List of components to add to the entity after the transformation
component_groupsList of text[]Names of component groups to add
delayObject{"block_assist_chance": 0, "block_chance": 0, "block_max"…Defines the properties of the delay for the transformation
valueDecimalmin 00Time in seconds before the entity transforms
range_minDecimal0Time 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_maxDecimal0Time 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_chanceDecimal0 to 10Chance that the entity will look for nearby blocks that can speed up the transformation. Value must be between 0.0 and 1.0
block_radiusIntegermin 00Distance in Blocks that the entity will search for blocks that can help the transformation
block_maxIntegermin 00Maximum 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_chanceDecimal0 to 10Chance that, once a block is found, will help speed up the transformation
block_typesList 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:

Related components