Compatibility
Minecraft: Java Edition
1.21.4
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
/schedule but with entity context.
So the scheduled function runs as (and at) the specified entity.
Beware of performance if used too much at once since it's
executing all scheduled functions as at the specified entity
Example
# Vanilla
schedule function example:function 20t
The above vanilla function (with no entity context) becomes this
# scheduler
function scheduler:args/set_entity with entity @r
function scheduler:args/set {function: "example_function", ticks: 20}
function scheduler:schedule with storage scheduler:args
A entity scheduled function can also be cleared via an entity or the function name
# clears via an entity
function scheduler:clear_entity with entity @r
# clears via the function name
function scheduler:clear_function {function: "example_function"}