HomeJavaDatapacksEntity Scheduler
Entity Scheduler

/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"}
Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more