Skip to main content

Clone (Command)

Summons the same clone entity that apoli:summon_clone creates, straight from a command. It has no short alias, because /clone is a vanilla command.

A clone copies the owning player's skin, name and, optionally, equipment. It follows and fights for them, and despawns when its lifetime runs out.

Sub-commands

Sub-commandWhat it does
summon <owners> [<pos>] [<options>]Spawns clones of each owner.
remove <owners> [<summon_id>]Discards an owner's clones.
list <owners>Prints an owner's live clones.

<owners> must be players, since a clone copies a player. Any other entity is skipped with a message.

summon

apoli:clone summon @s
apoli:clone summon @s ~ ~ ~5
apoli:clone summon @a ~ ~ ~ {count:3,lifetime:600,can_attack:false}

<pos> defaults to the owner's position, and the clones appear in the dimension the command runs in. <options> is an NBT compound in which every key is optional:

KeyTypeDefaultDescription
countInteger1How many clones to spawn per owner, from 1 to 64.
lifetimeInteger1200Ticks before the clone despawns. -1 never despawns.
can_attackBooleantrueWhether the clone attacks the owner's targets.
can_sitBooleantrueWhether right-clicking the clone toggles sitting.
follow_ownerBooleantrueWhether the clone follows its owner.
slimBooleanfalseUses the slim (3 pixel) arm model.
inherit_equipmentBooleantrueCopies the owner's armour and held items.
powersString or list of stringsnonePowers granted to the clone under the apoli:summon source.
summon_idStringnoneA tag you can pass to remove to target this batch.
wide_textureStringnoneA skin texture override for the wide model.
slim_textureStringnoneA skin texture override for the slim model.
apoli:clone summon @s ~ ~ ~ {count:2,summon_id:"example:shadow",powers:["example:shadow_glow"],lifetime:-1}

This summons two clones that never despawn, tagged example:shadow and holding example:shadow_glow.

remove

apoli:clone remove @s
apoli:clone remove @s example:shadow

Without a summon_id, every clone the owner has is discarded. With one, only clones carrying that ID are.

list

apoli:clone list @s

Prints each clone's UUID, owner, summon_id, lifetime and remaining lifetime, and returns the count.

note

remove and list search a 256-block box around each owner, in the dimension the command runs in, so clones in unloaded chunks or other dimensions aren't found.