Skip to main content

Entity action

Runs an operation on a single entity. Used in entity action fields such as entity_action and a trigger rule's action; action arrays run in order.

TypePurpose
saturn:no_opDoes nothing; usable as a placeholder action value.
saturn:sequenceRuns several actions of the same kind in array order.
saturn:chanceDecides whether the action fires based on a given chance.
saturn:if_elseRuns if_action when the condition holds, otherwise runs else_action.
saturn:choicePicks one action at random by weight and runs it.
saturn:send_messageSends a text component to players that match the recipient condition, optionally to the chat bar or the action bar.
saturn:jsCalls a callback registered by KubeJS and passes the params argument.
saturn:dismountMakes the entity leave its current mount.
saturn:extinguishClears the entity's current burning state.
saturn:healRestores the entity's health.
saturn:add_resourceAdds to the current value of the given Saturn resource.
saturn:grant_abilityGrants an ability to the entity under the given source ID.
saturn:remove_abilityRemoves an ability granted by the given source without affecting other sources.
saturn:apply_effectApplies a mob effect with the given duration and amplifier to the entity.
saturn:teleportChanges the position of the entity.
saturn:knockbackApplies velocity to the entity along the given vector.
saturn:modify_ability_storageWrites a state of the given kind into the storage of the target ability.
saturn:spawn_entitySpawns an entity at the position provided by the context or at the given coordinates.
saturn:spawn_projectileSpawns an entity and gives it the given initial velocity.
saturn:add_experienceAdds experience points, levels, or both to the player.
saturn:add_velocityAdds velocity, or replaces it with the given vector.
saturn:exhaustAdds to the player's food exhaustion.
saturn:feedAdds food and saturation to the player.
saturn:gain_airModifies the entity's remaining air.
saturn:give_itemCreates an item stack and hands it to the entity, optionally with a preferred equipment slot.
saturn:play_soundPlays the given sound at the entity.
saturn:remove_effectRemoves the given mob effect from the entity.
saturn:set_fall_distanceChanges the entity's accumulated fall distance.
saturn:set_no_gravityControls whether the entity ignores gravity.
saturn:set_on_fireSets the entity on fire for the given number of ticks.
saturn:swing_handTriggers the swing animation of the given hand.
saturn:emit_game_eventEmits a vanilla game event that sculk sensors and similar blocks can receive.
saturn:passenger_actionRuns an action on the entity's passengers, optionally recursing through multiple levels.
saturn:block_actionRuns a block action on the block at the entity's position.
saturn:self_bientity_actionRuns a bi-entity action with the same entity as both actor and target.
saturn:equipped_item_actionRuns an item action on the item stack in the given equipment slot.
saturn:riding_actionRuns an action on what the entity is riding, optionally recursing through the mount chain.
saturn:spawn_particlesSpawns particles near the entity with the given offset and spread parameters.
saturn:spawn_effect_cloudSpawns an area effect cloud with mob effects near the entity.