
Context Schedule
Simple library to schedule COMMANDS with entity context.
!img
Context Schedule is a Datapack Library that provides functions to schedule commands but conserving the entity context.
Also can be useful when you want to schedule an specific command but you dont want to create an entire function for it.
Usage
First, add the function context_schedule:api/load to your minecraft:tags/function/load (If you want to combine the datapacks, if you don't want to do it you can leave the datapack in your world)
Then, run this command as the entity you want:
function context_schedule:api/schedule {ticks:10,function:"say hihixd"}
ticks Means the ticks to delay the command.
function Means the command that will execute after the delay.
Executing ordering
The array of commands is iterated from end to start to avoid lag, so if you want two commands to run in the same tick in an specific order, you must put them from last to first.
Example:
function context_schedule:api/schedule {ticks:10,function:"say 1"}
function context_schedule:api/schedule {ticks:10,function:"say 2"}
Will execute:
say 2
say 1
