跳到正文

Context Schedule

作者:DEWONIC

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

常见问题

Context Schedule 支持哪些 Minecraft 版本?

Context Schedule 支持 Minecraft Java 版 1.21.8–26.2,共 8 个版本。下载时注意选择和你游戏版本一致的文件。

Context Schedule 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

DEWONIC 的其他作品

查看全部 →