Перейти к содержимому
Mineforgian

Context Schedule

Simple library to schedule COMMANDS with entity context.

Загрузки
53
Подписчики
0
Обновлён
20 июля 2026 г.
Лицензия
AGPL-3.0-only

Опубликован 9 мая 2026 г.

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

Ченджлог

1.2.1Релиз26.1.1, 26.1.2, 26.2 · 20 июля 2026 г.
  • Removed checking for entities with specific tag, making it more laggy but allowing more schedules in the same tick.
  • Removed unnecesary function context_schedule:internal/entry making it more straightforward.
v1.2Релиз26.1.1, 26.1.2, 26.2 · 19 июля 2026 г.
  • Uses UUID searching instead of ID + tag searching to reduce too many trash tags, making it easier to clean all the tags.

  • Restarts the global ID system when the array is empty, allowing to use the library for infinite time if used correctly.

  • global ID system starts from -2147483647 instead of 0, allowing to use a maxium of 4294967294 ids instead of 2147483647. Be aware that the number restarts when you append a schedule and the array is empty, so its quite impossible to overflow the global ID system

Комментарии

Загружаем…