HomeJavaDatapacksContext Schedule
Context Schedule

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
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