User Tools

Site Tools


actions:action_types:run_function

minecraft:run_function

The minecraft:run_function action type runs a function. The action is unsuccessful if the function does not exist, otherwise it returns the function's success result. This means that the return command can be used to influence the result of this action. The function uses permission level 2.

Fields

Name Description Type Default Value
function The function to call. A resource location referencing the function
context The context to use for applying the item modifier. An action context parameter set

Example

{
  "type": "minecraft:run_function",
  "function": "example:my_function",
  "context": {
    "entity": "this",
    "position": "this"
  }
}
actions/action_types/run_function.txt · Last modified: 2024/05/08 15:31 by errorcraft