Switch Shape (Entity Action Type)

Changes the player's WoodWalkers shape.

Changes the player’s shape. With no shape it clears the shape and returns them to normal.

There is a bi-entity version of this action too, which takes its shape from the target — that is how you write “become whatever you just killed”.

Type ID: apoli:switch_shape (aliases apoli:change_shape, apoli:morph, shappoli:switch_shape)

Fields

FieldTypeDefaultDescription
shapeIdentifieroptionalThe entity type to become. Omit it to clear the shape.
nbtNBToptionalExtra NBT for the shape entity, for variants such as a cat’s or a horse’s.
action_on_successEntity ActionoptionalRuns on the player only if the shape actually changed. WoodWalkers refuses blacklisted entity types, and an apoli:prevent_shape_change power can refuse too.

Examples

Become a bat on a keybind, with a puff of smoke to sell it:

{
  "type": "apoli:action_on_key_press",
  "key": { "key": "key.origins.primary_active" },
  "cooldown": 100,
  "entity_action": {
    "type": "apoli:switch_shape",
    "shape": "minecraft:bat",
    "action_on_success": {
      "type": "apoli:spawn_particles",
      "particle": "minecraft:smoke",
      "count": 20
    }
  }
}

Turn back into yourself:

{
  "type": "apoli:switch_shape"
}

A shape with variant data:

{
  "type": "apoli:switch_shape",
  "shape": "minecraft:cat",
  "nbt": { "variant": "minecraft:black" }
}

Become what you killed, using the bi-entity form:

{
  "type": "apoli:action_on_kill",
  "bientity_action": {
    "type": "apoli:switch_shape"
  }
}

Needs WoodWalkers. This type does not exist without it, so a pack using it must depend on the mod.