Skip to main content

Entity Action Types

Entity actions perform operations on a single entity. Use them inside power types and other actions.

origins:action_on_set

Executes a bi-entity action for each entity in an entity set.

FieldTypeDefaultDescription
set Wildcard IdentifierrequiredEntity set ID
bientity_actionBi-entity ActionrequiredAction between source and each set member
bientity_conditionBi-entity ConditionoptionalFilter for set members
limitInteger0Max entities to target (0 = unlimited)
reverseBooleanfalseIf true, iterate in reverse order

origins:add_velocity

Adds velocity to the entity.

FieldTypeDefaultDescription
xFloat0.0Velocity on the X axis
yFloat0.0Velocity on the Y axis
zFloat0.0Velocity on the Z axis
spaceSpaceworldCoordinate space for the velocity
setBooleanfalseIf true, sets velocity instead of adding
Example
"entity_action": {
"type": "origins:add_velocity",
"y": 2
}

This example will add an upward velocity to the entity, launching it into the air.

origins:add_xp

Adds experience points or levels.

FieldTypeDefaultDescription
pointsIntegerrequiredXP points to add
levelsIntegerrequiredXP levels to add
Example
"entity_action": {
"type": "origins:add_xp",
"levels": 2
}

This example will add 2 levels to the player.

origins:apply_effect

Applies a status effect (different internal behavior from add_effect).

FieldTypeDefaultDescription
effectValueOrList of MobEffectInstancerequiredEffects to apply
Example
"entity_action": {
"type": "origins:apply_effect",
"effect": {
"id": "minecraft:speed",
"duration": 400,
"amplifier": 0
}
}

This example will apply a Speed I status effect to the entity that would last for 20 seconds.

origins:area_of_effect

Executes a bi-entity action within a specified radius.

FieldTypeDefaultDescription
radiusFloat16.0Determines the radius of the area.
bientity_actionBi-entity ActionrequiredBi-entity action to execute on the actor and entities within the radius.
bientity_conditionBi-entity ConditionoptionalIf specified, only executes the action if this condition is fulfilled.
include_targetBooleanfalseIf true, the actor itself is also included as a target.
Example
"entity_action": {
"type": "origins:area_of_effect",
"radius": 32,
"bientity_action": {
"type": "origins:target_action",
"action": {
"type": "origins:set_on_fire",
"duration": 5
}
},
"bientity_condition": {
"type": "origins:can_see"
}
}

This example will set entities within a 32 block radius on fire for 5 seconds if the entities that are within the radius can be "seen" by the entity that invoked the action.

origins:award_stat

Increments one or more Minecraft stats. Only works on the server side.

FieldTypeDefaultDescription
statStat Reference or ListrequiredStats to increment
amountInteger1Amount to increment
Example 1
{
"type": "origins:award_stat",
"stat": [
"minecraft:jump",
"minecraft:sprint_one_cm"
]
}

This example will increment both the minecraft:jump and minecraft:sprint_one_cm stats by 1.

Example 2
{
"type": "origins:award_stat",
"stat": {
"stat_type": "minecraft:mined",
"id": "minecraft:diamond_ore"
},
"amount": 20
}

This example will increment the minecraft:mined:minecraft:diamond_ore stat by 20.

origins:block_action

Executes a block action at the entity's position.

FieldTypeDefaultDescription
block_actionBlock ActionrequiredAction to execute

origins:block_action_at

Executes a block action at a specific offset from the entity.

FieldTypeDefaultDescription
block_actionBlock ActionoptionalAction to execute
Example
"entity_action": {
"type": "origins:block_action_at",
"block_action": {
"type": "origins:set_block",
"block": "minecraft:sand"
}
}

This example will execute a Set Block that would set a Sand block at the entity's feet.

origins:change_resource

Changes a resource value by a specified amount.

FieldTypeDefaultDescription
resourceWildcard IdentifierrequiredResource power ID
changeInteger or Resource ReferencerequiredAmount to change (can be negative)
operationStringaddOperation: add or set
Example
"entity_action": {
"type": "origins:change_resource",
"resource": "namespace:example",
"change": 1
}

This example will add 1 to the namespace:example (data/namespace/powers/example.json) power that uses the Resource (Power Type).

origins:variable_change_resource

Changes a resource by an expression result.

FieldTypeDefaultDescription
resourceWildcard IdentifierrequiredResource power ID
expressionStringrequiredExpression evaluated with exp4j
variablesVariablesoptionalResource values available to the expression
operationStringaddadd or set

origins:clear_set

Clears an entity set.

FieldTypeDefaultDescription
setWildcard IdentifierrequiredEntity set ID

origins:crafting_table

Opens a crafting table GUI for the entity.

origins:damage

Damages the entity.

FieldTypeDefaultDescription
damage_typeIdentifierrequiredDamage type ID
amountFloatrequiredDamage amount
modifierModifier or List[]Modifiers applied to the damage
Example
"entity_action": {
"type": "origins:damage",
"amount": 4,
"damage_type": "minecraft:on_fire"
}

This example will damage the entity for 4 points (2 hearts) of fire damage.

origins:dismount

Forces the entity to dismount from any vehicle it is currently riding.

origins:drop_inventory

Drops the entity's inventory.

FieldTypeDefaultDescription
powerIdentifieroptionalPower whose inventory to drop
entity_actionEntity ActionoptionalAction on dropped items
item_actionItem ActionoptionalAction applied to each dropped item
item_conditionItem ConditionoptionalFilter for items to drop
slotList of IntegeroptionalSpecific slots to drop
throw_randomlyBooleanfalseWhether items scatter randomly
retain_ownershipBooleantrueWhether dropped items retain ownership
amountInteger0Max items to drop (0 = all)
Example
"entity_action": {
"type": "origins:drop_inventory"
}

This example will drop all the items from the entity's inventory.

origins:emit_game_event

Emits a game event at the entity's location.

FieldTypeDefaultDescription
actionIdentifierrequiredGame event ID
Example
"entity_action": {
"type": "origins:emit_game_event",
"event": "minecraft:ring_bell"
}

This example will emit a minecraft:ring_bell game event, which has a redstone signal output of 6.

origins:ender_chest

Opens the ender chest GUI for the entity.

origins:equipped_item_action

Executes an item action on the entity's equipped item.

FieldTypeDefaultDescription
slotEquipment Slot GrouprequiredWhich equipment slot
actionItem ActionrequiredAction to execute
Example
"entity_action": {
"type": "origins:equipped_item_action",
"equipment_slot": "mainhand",
"action": {
"type": "origins:consume",
"amount": 1
}
}

This example will "consume" (remove) 1 item from the item stack in the mainhand equipment slot.

origins:execute_command

Executes a command as the entity.

FieldTypeDefaultDescription
commandStringrequiredCommand to execute
Example
"entity_action": {
"type": "origins:execute_command",
"command": "tellraw @a {\"text\": \"Hello world!\", \"color\": \"green\"}"
}

This example will execute a Set Block that would set a Sand block at the entity's feet.

origins:variable_execute_command

Executes a command as the entity after interpolating resource variables. See Variables for interpolation forms.

FieldTypeDefaultDescription
commandStringrequiredCommand to execute
variablesVariablesoptionalResource values available to the command

origins:exhaust

Adds exhaustion to the player.

FieldTypeDefaultDescription
amountFloatrequiredExhaustion amount
Example
"entity_action": {
"type": "origins:exhaust",
"amount": 0.4
}

This example will add 1 to the namespace:example (data/namespace/powers/example.json) power that uses the Resource (Power Type).

origins:explode

Creates an explosion at the entity's location.

FieldTypeDefaultDescription
powerFloatrequiredExplosion power
destruction_typeStringbreakBlock destruction: break, destroy, none
indestructibleBlock ConditionoptionalBlocks immune to the explosion
create_fireBooleanfalseWhether to create fire
Example
"entity_action": {
"type": "origins:explode",
"power": 5,
"damage_self": false,
"create_fire": false
}

This example will drop all the items from the entity's inventory.

origins:extinguish

Extinguishes fire on the entity.

origins:feed

Restores hunger and saturation.

FieldTypeDefaultDescription
foodIntegerrequiredFood points to restore
saturationFloatrequiredSaturation to restore
Example
"entity_action": {
"type": "origins:feed",
"food": 4,
"saturation": 2
}

This example will emit a minecraft:ring_bell game event, which has a redstone signal output of 6.

origins:fire_projectile

Fires a projectile from the entity.

FieldTypeDefaultDescription
entity_typeIdentifierrequiredProjectile entity type ID
divergenceFloat1.0Projectile spread/divergence
speedFloat1.0Projectile speed multiplier
countInteger1Number of projectiles to fire
tagNBT CompoundoptionalNBT data tag for the projectile entity
projectile_actionEntity ActionoptionalAction to execute for each fired projectile

origins:gain_air

Refills the entity's air (oxygen).

FieldTypeDefaultDescription
valueIntegerrequiredAir to add
Example
"entity_action": {
"type": "origins:gain_air",
"value": 20
}

This example will "consume" (remove) 1 item from the item stack in the mainhand equipment slot.

origins:give_item

Gives an item to the entity.

FieldTypeDefaultDescription
stackItem StackrequiredItem to give
item_actionItem ActionoptionalAction applied to the item before giving
preferred_slotEquipment Slot GroupoptionalPreferred inventory slot
Example
"entity_action": {
"type": "origins:give_item",
"stack": {
"item": "minecraft:egg",
"amount": 3
}
}

This example will restore about 1 second of breath to the entity.

origins:grant_advancement

Grants an advancement to the player.

FieldTypeDefaultDescription
advancementIdentifierrequiredAdvancement ID
Example
"entity_action": {
"type": "origins:grant_advancement",
"advancement": "minecraft:adventure/arbalistic"
}

This example will grant the player the Arbalistic advancement.

origins:grant_power

Grants a power to the entity.

FieldTypeDefaultDescription
powerIdentifierrequiredPower ID
sourceWildcard IdentifierrequiredSource identifier for the power
Example
"entity_action": {
"type": "origins:grant_power",
"power": "origins:burn_in_daylight",
"source": "example:power_source"
}

This example will grant the entity the origins:burn_in_daylight power from the example:power_source source.

origins:heal

Heals the entity.

FieldTypeDefaultDescription
amountFloatrequiredHealth to restore
Example
"entity_action": {
"type": "origins:heal",
"amount": 6
}

This example gives the entity 3 Eggs.

origins:modify_attack_cooldown

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Changes a player's current attack-strength cooldown ticker through a Modifier.

FieldTypeDefaultDescription
modifierModifierrequiredModifier applied to the current cooldown ticker

origins:modify_attack_cooldown

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Changes a player's current attack-strength cooldown ticker through a Modifier. A value of 0 means the attack cooldown has just started; the normal maximum means it is ready.

FieldTypeDefaultDescription
modifierModifierrequiredModifier applied to the current cooldown ticker

origins:modify_death_ticks

Modifies the entity's death tick counter.

FieldTypeDefaultDescription
modifier[Modifier]requiredModifier applied to death ticks
Example
"entity_action": {
"type": "origins:modify_death_ticks",
"modifier": {
"operation": "set_total",
"value": 0
}
}

This example will make the corpse of the entity remain in the world forever.

origins:modify_inventory

Modifies items in the entity's inventory.

FieldTypeDefaultDescription
powerIdentifieroptionalPower whose inventory to modify
entity_actionEntity ActionoptionalAction on the entity
item_actionItem ActionrequiredAction to apply
item_conditionItem ConditionoptionalFilter for items to modify
slotList of IntegeroptionalSpecific slots to modify
process_modeStringSTACKSSTACKS or ITEMS
limitInteger0Max items to process (0 = unlimited)
Example
"entity_action": {
"type": "origins:modify_inventory",
"inventory_type": "power",
"power": "origins:extra_inventory",
"item_action": {
"type": "origins:consume"
}
}

This example will consume each item in the inventory of the origins:extra_inventory power, decreasing their count by 1.

origins:modify_resource

Modifies a resource value.

FieldTypeDefaultDescription
resourceWildcard IdentifierrequiredResource power ID
modifier[Modifier]requiredModifier applied
Example
"entity_action": {
"type": "origins:modify_resource",
"modifier": {
"operation": "add_base_early",
"value": 1
},
"resource": "example:1st_resource"
}

This example will add 1 to the example:1st_resource (data/example/powers/1st_resource.json) power.

origins:passenger_action

Executes an action on the entity's passengers.

FieldTypeDefaultDescription
actionEntity ActionrequiredAction to execute
recursiveBooleanoptionalWhether to apply recursively
Example
"entity_action": {
"type": "origins:passenger_action",
"action": {
"type": "origins:heal",
"amount": 2
},
"recursive": true
}

This example will heal all entities that are currently riding the entity that executed this entity action type.

origins:play_sound

Plays a sound.

FieldTypeDefaultDescription
soundIdentifierrequiredSound event ID
categoryStringoptionalSound category (e.g. neutral, player, hostile, ambient)
volumeFloat1.0Sound volume
pitchFloat1.0Sound pitch
Example
"entity_action": {
"type": "origins:play_sound",
"sound": "minecraft:entity.chicken.egg"
}

This example will play the minecraft:entity.chicken.egg sound event that can be heard within a 16 blocks distance. (16 * 1.0 = 16)

origins:random_teleport

Teleports the entity to a random nearby location.

FieldTypeDefaultDescription
area_widthFloat8.0Width/horizontal radius of the search area
area_heightFloat8.0Height/vertical radius of the search area
heightmapStringoptionalHeightmap type for ground placement (MOTION_BLOCKING, WORLD_SURFACE, etc.)
attemptsIntegeroptionalMax teleport attempts
landing_block_conditionBlock ConditionoptionalCondition the landing block must meet
landing_conditionEntity ConditionoptionalCondition at the landing position
landing_offsetObject{0,0,0}Offset from the landing position (x/y/z)
loaded_chunks_onlyBooleantrueOnly teleport to loaded chunks
success_actionEntity ActionoptionalAction on successful teleport
fail_actionEntity ActionoptionalAction on failed teleport

origins:raycast

Performs a raycast and executes actions on hit entities/blocks.

FieldTypeDefaultDescription
distanceFloatrequiredRaycast distance
blockBooleantrueWhether blocks are checked
entityBooleantrueWhether entities are checked
shape_typeStringvisualvisual or collider
fluid_handlingStringnonenone, source_only, any, or water
bientity_conditionBi-entity ConditionoptionalFilter for hit entities
before_actionEntity ActionoptionalAction executed before the raycast
bientity_actionBi-entity ActionoptionalAction on hit entity
block_actionBlock ActionoptionalAction on hit block
hit_actionEntity ActionoptionalAction on hit (entity or block)
miss_actionEntity ActionoptionalAction if nothing is hit
command_at_hitStringoptionalCommand executed at hit position
command_along_rayStringoptionalCommand executed along the ray path
command_stepFloat1.0Step distance for along-ray commands
command_hit_offsetFloatoptionalOffset from hit for command execution
command_along_ray_only_on_hitBooleantrueOnly show along-ray particles on hit
Example
"entity_action": {
"type": "origins:raycast",
"distance": 16,
"block": true,
"entity": true,
"shape_type": "visual",
"fluid_handling": "any",
"bientity_action": {
"type": "origins:target_action",
"action": {
"type": "origins:execute_command",
"command": "say I've been hit!"
}
},
"before_action": {
"type": "origins:execute_command",
"command": "say Before"
},
"hit_action": {
"type": "origins:execute_command",
"command": "say After (hit)"
},
"miss_action": {
"type": "origins:execute_command",
"command": "say After (miss)"
},
"command_at_hit": "particle minecraft:block_marker minecraft:emerald_block ~ ~ ~ 0 0 0 0.0 1 normal @a",
"command_along_ray": "particle minecraft:soul_fire_flame",
"command_step": 1,
"command_along_ray_only_on_hit": true
}

This example will cast a ray that can go through Glass blocks (or any blocks that are transparent and see-through) that will only display the Soul Fire Flame particle if the ray has hit a block/entity.

origins:remove_effect

Removes a status effect.

FieldTypeDefaultDescription
effectList of IdentifieroptionalEffect IDs to remove (all if not specified)
Example
"entity_action": {
"type": "origins:clear_effect",
"effect": "minecraft:poison"
}

This example will clear the Poison status effect from the entity.

origins:replace_entity

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Replaces a non-player entity with one of the configured entity types while retaining its serialized data, position, and rotation.

FieldTypeDefaultDescription
entity_typesList of Entity TyperequiredReplacement list
randomBooleanfalseChoose randomly instead of using the first list entry
tagNBT CompoundoptionalData merged into the replacement entity

origins:replace_entity

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Replaces a non-player entity with a configured entity type while retaining serialized data, position, and rotation.

FieldTypeDefaultDescription
entity_typesList of Entity TyperequiredReplacement list
randomBooleanfalseChoose randomly instead of the first list entry
tagNBT CompoundoptionalData merged into the replacement entity

origins:replace_inventory

Replaces the entity's inventory contents.

FieldTypeDefaultDescription
entity_actionEntity ActionoptionalAction on the entity
powerIdentifieroptionalPower whose inventory to replace
item_actionItem ActionrequiredAction to apply to each item
item_conditionItem ConditionoptionalFilter for items
slotList of IntegeroptionalSpecific slots to replace
merge_componentBooleantrueWhether to merge data components
stackItem StackrequiredReplacement item
Example
"entity_action": {
"type": "origins:replace_inventory",
"slot": "weapon.offhand",
"stack": {
"item": "minecraft:barrier"
}
}

This example will replace the item in the entity's offhand with a Barrier item.

origins:reset_stat

Resets (sets to 0) one or more Minecraft statistics for the entity. Only works on the server side.

The stat field accepts either a single Stat Reference or a list of them.

FieldTypeDefaultDescription
statStat Reference or ListrequiredStats to reset
Example 1
{
"type": "origins:reset_stat",
"stat": [
"minecraft:deaths",
"minecraft:jump",
"minecraft:walk_one_cm"
]
}

This example will reset the minecraft:deaths, minecraft:jump, and minecraft:walk_one_cm stats to 0 for the entity.

Example 2
{
"type": "origins:reset_stat",
"stat": {
"stat_type": "minecraft:mined",
"id": "minecraft:diamond_ore"
}
}

This example will reset the minecraft:mined:minecraft:diamond_ore stat to 0 for the entity.

origins:revoke_advancement

Revokes an advancement.

FieldTypeDefaultDescription
advancementIdentifierrequiredAdvancement ID
criterionList of String[]Specific criteria to revoke
selectionStringONLYSelection mode: ONLY, SKIP, EVERYTHING
Example
"entity_action": {
"type": "origins:revoke_advancement",
"advancement": "minecraft:adventure/arbalistic"
}

This example will revoke the Arbalistic advancement from the player, if they have it.

origins:revoke_power

Revokes a power from the entity.

FieldTypeDefaultDescription
powerIdentifieroptionalPower whose power source to revoke from
sourceWildcard IdentifierrequiredSource identifier to revoke
Example
"entity_action": {
"type": "origins:revoke_power",
"power": "origins:elytra",
"source": "origins:elytrian"
}

This example will revoke the origins:elytra power from the origins:elytrian source from the entity.

origins:riding_action

Executes an action on the entity being ridden.

FieldTypeDefaultDescription
actionEntity ActionrequiredAction to execute
recursiveBooleanoptionalWhether to apply recursively
Example
"entity_action": {
"type": "origins:riding_action",
"action": {
"type": "origins:apply_effect",
"effect": {
"effect": "minecraft:speed",
"duration": 100,
"amplifier": 1
}
}
}

This example will apply a Speed II status effect to the entity that is currently being ridden by the entity that executed the entity action type.

origins:selector_action

Execute action on entities selected by a selector. With a condition to filter the selected entities.

FieldTypeDefaultDescription
selectorStringrequiredEntity selector (e.g. @p, @e[type=minecraft:zombie], etc.)
bientity_actionBi-entity ActionrequiredAction to execute
bientity_conditionBi-entity ConditionoptionalFilter for selected entities

origins:self_bientity_action

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Executes a bi-entity action with the same entity as both actor and target.

FieldTypeDefaultDescription
actionBi-entity ActionrequiredAction to execute with this entity in both roles

origins:set_fall_distance

Sets the entity's fall distance (affects fall damage).

FieldTypeDefaultDescription
fall_distanceFloatrequiredNew fall distance
Example
"entity_action": {
"type": "origins:set_fall_distance",
"fall_distance": 0
}

This example will reset the entity's fall distance so that the fall damage is now calculated from that point.

origins:set_no_gravity

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Sets whether the entity is affected by gravity.

FieldTypeDefaultDescription
no_gravityBooleantrueWhether gravity is disabled

origins:set_on_fire

Sets the entity on fire.

FieldTypeDefaultDescription
tickIntegerrequiredFire duration in ticks
Example
"entity_action": {
"type": "origins:set_on_fire",
"duration": 5
}

This example will clear the Poison status effect from the entity.

origins:set_origin

Unstable

This action is currently unstable and may not work as intended. Please report if you encounter any issues with it.

Sets the entity's origin in a layer.

FieldTypeDefaultDescription
layerLayerrequiredLayer whose origin will be changed
originOriginrequiredOrigin to assign

origins:spawn_effect_cloud

Spawns an effect cloud at the entity's position.

FieldTypeDefaultDescription
effectList of MobEffectInstanceoptionalEffects in the cloud
radiusFloat3.0Cloud radius
radius_on_useFloat0.5Radius increase on use
wait_timeIntegeroptionalCloud duration
Example
"entity_action": {
"type": "origins:spawn_effect_cloud",
"radius": 10.0,
"wait_time": 40,
"effect": {
"effect": "minecraft:resistance",
"amplifier": 3,
"duration": 100
}
}

This example will spawn a large Area Effect Cloud, which provides the Resistance IV status effect that will last for 5 seconds at the entity's position.

origins:spawn_entity

Spawns an entity at the entity's position.

FieldTypeDefaultDescription
entity_typeIdentifierrequiredEntity type ID
tagNBToptionalInitial NBT data
entity_actionEntity ActionoptionalAction executed on the spawned entity
bientity_actionBi-entity ActionoptionalAction between spawner and spawned entity
Example
"entity_action": {
"type": "origins:spawn_entity",
"entity_type": "minecraft:zombie",
"tag": "{NoAI:1b,IsBaby:1}"
}

This example will grant the player the Arbalistic advancement.

origins:spawn_particles

Spawns particles at the entity's position.

FieldTypeDefaultDescription
particleParticle OptionrequiredParticle type and params
countIntegerrequiredNumber of particles
speedFloat0.0Particle speed
spreadObjectoptionalSpread (x/y/z, default 0.5)
bientity_conditionBi-entity ConditionoptionalOnly show to matching viewers
forceBooleanoptionalForce particle display
offset_xFloat0.0X offset
offset_yFloat0.0Y offset
offset_zFloat0.0Z offset
Example
"entity_action": {
"type": "origins:spawn_particles",
"particle": {
"type": "minecraft:block",
"params": "minecraft:redstone_block"
},
"count": 16,
"speed": 0.0,
"force": true,
"spread": {
"x": 3.0,
"y": 0.0,
"z": 3.0
}
}

This example will spawn a particle cuboid that is about 5x0x5 in size that will use the Redstone Block texture.

Spread fields: x, y, z (Float, default 0.0).

origins:swing_hand

Makes the entity swing their hand.

FieldTypeDefaultDescription
handStringrequiredMAIN_HAND or OFF_HAND
Example
"entity_action": {
"type": "origins:swing_hand",
"hand": "OFF_HAND"
}

This example will swing the entity's off hand.

origins:toggle

Toggles another power on/off.

FieldTypeDefaultDescription
powerWildcard IdentifierrequiredPower ID to toggle
Example
"entity_action": {
"type": "origins:toggle",
"power": "origins:phantomize"
}

This example will grant the entity the origins:burn_in_daylight power from the example:power_source source.

origins:trigger_cooldown

Triggers the cooldown of another power.

FieldTypeDefaultDescription
powerWildcard IdentifierrequiredPower ID whose cooldown to trigger
Example
"entity_action": {
"type": "origins:trigger_cooldown",
"power": "origins:launch_into_air"
}

This example will restore about 3 hearts to the entity.