Entity Scheduler

Quick rating

Community listing page, reviews may not be monitored by the author.

Entity Scheduler

By VilleOlofOwner

No reviews yet

/schedule but with entity context

Mod Loaders
Minecraft

About

Description

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