介绍
Datapack Items
As a datapack creator, I’ve always wanted the ability to create real Minecraft items using nothing more than the data folder and a simple JSON file. Minecraft already provides an incredibly powerful component system, so being unable to create custom items directly from datapacks has always felt like a major limitation.
Datapack Items is my small “protest” toward Mojang: a library that brings this functionality to Minecraft now, while hoping that something similar is eventually added to vanilla.
The mod allows datapacks to define real items using:
data/<namespace>/items/<id>.json
Each item is registered with its own namespace and can be obtained with /give. Items support Minecraft’s native data components, including custom names, models, rarity, stack size, consumable behavior, equipment properties, and more. Components from other mods can also be used dynamically, as long as they are available during loading.
Items can be assigned to one or multiple Creative Mode tabs, or left without a tab if no valid category is specified. The default value is minecraft:building_blocks.
Datapack Items is designed as a library for datapack creators and mod developers who want to add custom items without writing Java code or creating traditional item registration systems.
It supports regular datapacks, global datapacks, and datapacks injected through tools such as Prism Launcher.
Creative tabs examples:
minecraft:building_blocks
minecraft:colored_blocks
minecraft:natural_blocks
minecraft:combat
常见问题
Datapack Items 支持哪些 Minecraft 版本?
Datapack Items 支持 Minecraft Java 版 26.2–26.3,共 2 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Datapack Items 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
评论
登录后评论和评分