Transfer Origin (Bi-Entity Action Type)
Bi-entity action — moves (or copies) a whole origin between two players.
Moves (or copies) a whole origin between two players, the way apoli:transfer moves powers by source. Because an origin is just the set of powers granted from its layer, this re-homes a player’s pick on one layer onto another player’s layer in a single action — steal an origin off someone, hand yours to them, or copy it across.
Type ID: origins:transfer_origin — a bi-entity action.
Needs the Origins mod. Registered by Origins, not core Apoli. Both the actor and target must be players. If the donor has no origin in
from_layer, nothing is transferred — but theactor_action/target_actionfollow-ups still run. A move never strips the donor unless the destination layer/origin resolves, so a badto_layercan’t destroy an origin.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | steal | steal takes the target’s origin onto the actor; give hands the actor’s origin to the target. (Determines which side is the donor and which is the recipient.) |
copy | Boolean | false | If false, the origin is moved — the donor loses it on from_layer entirely. If true, it is copied (the donor keeps it); this is exactly what origins:copy_origin does. |
from_layer | Identifier | origins:origin | The layer the origin is read from on the donor. |
to_layer | Identifier | origins:origin | The layer the origin is written to on the recipient. Use a dedicated layer (e.g. origins:copy) to add the origin alongside the recipient’s own, or the same layer to replace it. |
actor_action | Entity Action | optional | Action run on the actor after the transfer (e.g. a sound or particle). |
target_action | Entity Action | optional | Action run on the target after the transfer. |
How it works
An origin choice is stored as layer → origin plus the powers granted under that layer’s source (layer/<path>). transfer_origin:
- Reads the donor’s origin on
from_layer. - Reconciles the recipient’s
to_layerto that origin (the same power-grant path a normal choose uses — resources start fresh,apoli:inventorycontents aren’t disturbed). - On a move (
copy: false), strips the donor’sfrom_layer— its powers and its pick both go. - Broadcasts both players so the view-origin GUIs re-sync.
Removing an origin can gate off a dependent layer (e.g. a copy/one-for-all layer conditioned on holding it); those are revalidated automatically on both sides.
Relationship to other actions
origins:copy_originis thecopy: true,to_layer: origins:copyspecial case — kept for back-compat and readability.apoli:transferis the layer-agnostic primitive that moves powers by source. Use it when you want power-level control; usetransfer_originwhen you want to think in whole origins and keep thelayer → originbookkeeping (GUI, badges, One-For-All gating) correct.
Examples
Steal the target’s main origin onto yourself, taking it away from them (they’re left originless on origins:origin until they re-pick):
{
"type": "origins:transfer_origin",
"mode": "steal",
"copy": false,
"from_layer": "origins:origin",
"to_layer": "origins:origin",
"actor_action": {
"type": "apoli:play_sound",
"sound": "minecraft:entity.enderman.teleport"
}
} Steal the target’s origin but park it on your copy layer (you keep your own origin; they lose theirs):
{
"type": "origins:transfer_origin",
"mode": "steal",
"copy": false,
"from_layer": "origins:origin",
"to_layer": "origins:copy"
} Give your own origin to the target as a permanent gift, losing it yourself:
{
"type": "origins:transfer_origin",
"mode": "give",
"copy": false
}