1. Wiki
  2. /Entities
  3. /minecraft:transformation

minecraft:transformation

Don't want to write this by hand? GodCraft sets minecraft:transformation for you with a switch.Get GodCraft

Overview

minecraft:transformation is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Turns the entity into a different entity, like a villager changing into a zombie villager. Add it through an event when the change should happen.

Fields

FieldTypeDefaultDescription
addJSON ObjectnoneComponent groups to add to the new entity after it transforms.
begin_transform_soundStringnoneSound played as the transformation begins.
delayJSON ObjectnoneSettings for waiting before the change happens.
drop_equipmentBoolean"false"If true, the entity drops everything it is wearing or holding.
drop_inventoryBoolean"false"If true, the entity drops the items in its inventory.
intoStringnoneThe entity it becomes, optionally with an event, like minecraft:zombie<minecraft:as_adult>.
keep_levelBoolean"false"If true, a trader keeps its trade level after changing.
keep_ownerBoolean"false"If true, a tamed entity keeps its owner after changing.
preserve_equipmentBoolean"false"If true, the new entity keeps the old entity's gear.
transformation_soundStringnoneSound played when the transformation finishes.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:transformation": {
    "add": {},
    "begin_transform_sound": "",
    "delay": {},
    "drop_equipment": "false",
    "drop_inventory": "false",
    "into": "",
    "keep_level": "false",
    "keep_owner": "false"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more