
Datapack Commands
你的命令,你的规则。
将任意数据包函数转化为真正的斜杠命令——无需客户端模组、无需重启、无需麻烦。 玩家开箱即用获得自动补全功能。一切尽在掌控之中。
功能介绍
/cgen create heal utils:heal_player —— 就是这样。
玩家现在可以输入 /heal,你的数据包函数便会立即运行。瞬间生效,人人可用。
命令在重启后依然保留,并显示在自动补全列表中,同样可以轻松移除。
命令
/cgen create <name> <namespace:function>
注册一个新的斜杠命令,用于运行数据包函数。
/cgen create heal utils:heal_player
/cgen create "shop haste" mypack:give_haste
玩家现在可以输入
/heal或/shop haste—— 无需安装客户端模组。
/cgen remove <name>
立即注销一个命令。它也会从自动补全列表中消失。
/cgen remove heal
/cgen list
显示所有已注册的命令及其映射的目标。
已注册命令:
/heal -> utils:heal_player
/shop -> mypack:open_shop
/cgen feedback <on|off>
切换在使用命令时是否在聊天栏中显示 "Executed function: ..."。
默认关闭。 设置会在重启后保留。
/cgen check
如果模组已加载则返回 1。可在你的数据包中使用此命令来验证 Datapack Commands 是否正在运行。
须知
- 使用
/cgen需要 操作者等级 4 - 已注册的玩家(非 OP)可以自由使用创建的命令
- 命令保存至
"world"/datapackcommands.json - 命令名称:仅限字母数字及下划线,最长 32 个字符
- 建议与 Filiment 搭配使用
仅服务器端运行 —— 玩家无需安装任何内容。
本模组可用于整合包,并可作为任何数据包/模组的依赖项

Datapack Commands
Your commands, your rules.
Turn any datapack function into a real slash command — no client mod, no restart, no hassle. Players get tab completion out of the box. You stay in control.
What it does
/cgen create heal utils:heal_player — that's it.
Players can now type /heal and your datapack function runs. Instantly. For everyone.
Commands persist across restarts, show up in tab completion, and can be removed just as easily.
Commands
/cgen create <name> <namespace:function>
Registers a new slash command that runs a datapack function.
/cgen create heal utils:heal_player
/cgen create "shop haste" mypack:give_haste
Players can now type
/healor/shop haste— no client mod needed.
/cgen remove <name>
Unregisters a command immediately. Gone from tab completion too.
/cgen remove heal
/cgen list
Shows all registered commands and what they map to.
Registered commands:
/heal -> utils:heal_player
/shop -> mypack:open_shop
/cgen feedback <on|off>
Toggle whether "Executed function: ..." appears in chat when a command is used.
Off by default. Persists across restarts.
/cgen check
Returns 1 if the mod is loaded. Use this in your datapack to verify Datapack Commands is running.
Good to know
- Requires operator level 4 to use
/cgen - Registered players (without OP) can use the created commands freely
- Commands are saved to
"world"/datapackcommands.json - Command names: alphanumeric + underscores, max 32 characters
- This should pair well with Filiment
Server-side only — players don't need to install anything.
This Mod may be used in modpacks and as dependencies for any datapacks/mods
下载 Datapack Commands
下载 Datapack Commands
下载 Datapack Commands
下载 Datapack Commands
下载 Datapack Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Datapack Commands
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧