通用数据包
从配置文件夹加载全局数据包,自动应用于所有世界。
Universal Data Pack 是一款面向整合包开发者的轻量级实用模组。它会在 config/universaldatapack/ 创建一个文件夹,该文件夹充当标准的 Minecraft 数据包——放入其中的任何内容都会自动应用到实例中的所有世界(包括新建和已有的世界),玩家无需进行任何操作。
为什么需要?
Minecraft 内置的数据包系统是按世界隔离的。如果你正在构建一个整合包,并且需要在全局范围内覆盖配方、调整战利品表或添加进度,通常你需要手动将数据包包含在每个世界中,或者将其封装进一个模组 JAR 文件中。Universal Data Pack 提供了一种基于文件夹的简单工作流程——只需将文件放入文件夹即可。
工作原理
首次启动时,模组会创建以下文件夹结构:
config/universaldatapack/
pack.mcmeta
data/
README.txt
data/ 内的所有内容均遵循标准 Minecraft 数据包的约定。模组会将此文件夹注册为最高优先级的必需服务器数据包,因此它会最后加载并覆盖其他所有数据包和模组。在首次运行时,data/ 文件夹内会生成一个 README 文件,其中包含示例和使用说明。
用法
覆盖现有配方:在 data/ 文件夹内镜像目标模组的命名空间(namespace)和路径。例如,要覆盖 EnderIO 的熔炼配方:
config/universaldatapack/data/enderio/recipe/alloy_smelting/dark_steel.json
若要完全禁用某个配方,可将文件内容设为空的 JSON 对象:{}
添加新内容:创建你自己的命名空间文件夹,并添加配方、进度、战利品表、标签或其他任何数据包内容:
config/universaldatapack/data/mymodpack/recipe/custom_sword.json
config/universaldatapack/data/mymodpack/advancement/craft_custom_sword.json
重载更改:更改在世界加载时生效,也可通过 /reload 命令立即生效。
我可以在我的整合包中使用这个模组吗?
当然可以!该模组专为包含在整合包中而设计。它本身不包含任何游戏玩法内容。
Universal Data Pack
Load a global data pack from your config folder, applied to all worlds automatically.
Universal Data Pack is a lightweight utility mod for modpack developers. It creates a folder at config/universaldatapack/ that acts as a standard Minecraft data pack — any content placed inside is applied to every world in the instance, both new and existing, without the player needing to do anything.
Why?
Minecraft's built-in data pack system is per-world. If you're building a modpack and need to override recipes, adjust loot tables, or add advancements globally, you'd normally need to either include the data pack in every world manually or wrap it in a mod JAR. Universal Data Pack gives you a simple folder-based workflow instead — just drop your files in and go.
How It Works
On first launch, the mod creates the following folder structure:
config/universaldatapack/
pack.mcmeta
data/
README.txt
Everything inside data/ follows standard Minecraft data pack conventions. The mod registers this folder as a required server data pack at the highest priority, so it loads last and overrides all other data packs and mods. A README file is generated inside the data/ folder on first run with examples and usage instructions.
Usage
Override an existing recipe:Mirror the target mod's namespace and path inside the data/ folder. For example, to override an EnderIO smelting recipe:
config/universaldatapack/data/enderio/recipe/alloy_smelting/dark_steel.json
To disable a recipe entirely, use an empty JSON object as the file contents: {}
Add new content:Create your own namespace folder and add recipes, advancements, loot tables, tags, or any other data pack content:
config/universaldatapack/data/mymodpack/recipe/custom_sword.json
config/universaldatapack/data/mymodpack/advancement/craft_custom_sword.json
Reload changes: Changes take effect on world load and with the /reload command.
Can I use this in my modpack?
Definitely! This mod is designed to be included in modpacks. It contains no gameplay content on its own.
评论 0
登录后参与评分
还没有评论,来抢沙发吧