wifi_left 发表于 2025-6-25 22:02:08

数据包命令升级工具

本帖最后由 wifi_left 于 2025-6-25 22:06 编辑

Datapack Updater​

该项目旨在将您的命令从 1.20.4 升级到较新版本的 Minecraft (1.21)。
也支持从1.21.4到1.21.5的升级。
杀毒报告:https://www.virustotal.com/gui/file-analysis/MzkxMjQ1MDI0Y2EzY2QyOGFiNTAwMDkxYThkODBiMzc6MTc1MDg2MDA0Mg==

特点


​支持的命令

[*]/give
[*]/item
[*]/clear
[*]/summon for 'Firework' and 'Item'
[*]/setblock
[*]/fill
[*]/execute if block
[*]/execute if data
[*]/data
[*]选择器 (比如 @a)

开始使用​
Command Arguments:
...

Supported commands:
-h Show help texts(This).
-i <input(File)> <Output File> Transform a File.
[-y]                            Overwrite the existed file.
-i <input(Folder)> <Output Folder> Transform a Folder.
[-y]                            Overwrite the existed file.
-debug                              Show debug messages
-c <commands>                     Transform a command. Use '\\n' to transform multiline commands.`);


下载、安装


​你可以直接从 GitHub 下载源码后启动
或者使用Git命令下载:
git clone https://github.com/wifi-left/Datapack-Upgrader.git您也可以使用在线版,无需安装任何软件:https://wifi-left.github.io/Datapack-Upgrader/
安装完毕后​请在目录输入
npm install
,等待成功后即可通过
node index.js
启动

转换单个命令​

请注意,引号中的内容需要转义。
所以我们更推荐您使用转换文件。​
node index.js -c "<Your commands here>"
比如
node index.js -c "give @s diamond_sword{Enchantments:[{id:\"sweeping\",lvl:1s}],display:{Name:'\"sss\"',color:114514,Lore:['\"Hello world!\\u00a7a1\"','\"\\u00a7cThis is wifi_left!\"']},Unbreakable:1b,Damage:1s}"

转换文件(夹)​
node index.js -i "<输入文件(夹)>" <输出位置> [-y]

其中 '-y' 选项可以指定是否覆盖文件。

使用交互式引导​(建议)


您可以通过启动时不带任何参数启动交互式引导
请注意,这项功能可能会因为控制台编码问题导致乱码。
如果您是Windows系统,建议您在启动前先输入:
chcp 65001
转换成UTF-8编码再启动程序。






页: [1]
查看完整版本: 数据包命令升级工具