Skip to main content

Item action

Operates on the item stack and its holder from the context. It is not an item definition file; embed it in a field that requires an ItemAction.

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:damage_itemApplies the given durability loss to the item stack.
saturn:consume_itemReduces the count of the item stack in the context.
saturn:consume_healthConsumes health from the item holder.
saturn:cooldownReads or sets the cooldown state.
saturn:remove_enchantmentRemoves selected enchantments from the item, optionally resetting the repair cost.
saturn:add_enchantmentAdds or overrides enchantment levels on the item according to the map.
saturn:merge_componentsMerges a data component patch into the item stack.