Custom Item Data
by Hdi
Custom Item Data is a Fabric and Quilt library that lets mod developers attach typed, schema-validated data to item stacks and persist it across saves.
What it does
Developers register a schema for their own data keys once, during onInitialize after Minecraft's registries are ready. The schema states which type each key holds and the value allowed for it. The primitive types are int, float, string and boolean, and a developer can also plug in a custom type by implementing the CustomDataType interface. Once a schema exists, the ItemDataAPI can read and write values on any ItemStack, and it checks each value against the schema before storing it. A write that fails validation returns false and leaves the stack unchanged.
On the game side, server administrators can define and edit item data in-game with the itemdata commands, without writing any code. The commands act on the item held in the main hand and require operator level 2. Each value is kept in one ItemDataComponent attached to the stack, written out as text, and it persists through saves, reloads, item gives and copies. Stacks that carry different data do not merge, as vanilla Data Components behave. The mod itself adds no visible content; it becomes useful when another mod calls the API.
Key features
Typed data on item stacks
Integers, floats, strings and booleans can be stored on any ItemStack, and new types can be added by implementing an interface.
Schema validation
Values that do not match the registered type for a key are rejected, so stored data stays consistent with its schema.
Persistence across saves
Stored values survive world saves and reloads, and they carry over when a stack is given or cloned.
In-game itemdata commands
Operators can view and set item data from the game console while holding the item, without a mod that calls the API.
Separate data components
Two stacks with different stored data do not stack together, which keeps item states from being merged by mistake.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Required by 1 mod
How it compares
MosaicCore is a server-side only library for Fabric and Quilt covering 1.20 – 1.20.1, released under the GNU Lesser General Public License v3.0 only. Item On Chest is a client-side only Fabric mod for 1.20 – 1.20.4 under the CC0 1.0 Universal license. Under Control is a client and server mod for Fabric at 1.20.1 under the MIT License. Custom Item Data covers only 1.20.6 and needs both sides, so it differs from each of these in version range and environment.
| Mod | Loaders | Game versions | Environment | Updated |
|---|---|---|---|---|
| Custom Item Data | Fabric and Quilt | 1.20.6 | Client and server | 2026-05-12 |
| MosaicCore | Fabric and Quilt | 1.20 – 1.20.1 | Server-side only | 2023-08-04 |
| Item On Chest | Fabric | 1.20 – 1.20.4 | Client-side only | 2024-04-14 |
| Under Control | Fabric | 1.20.1 | Client and server | 2025-03-11 |
Questions
Which loaders does Custom Item Data support?
Does Star Wars Original Trilogy need this library?
Do servers need the mod installed?
In the catalog
Custom Item Data is one of 4,058 Storage mods on ModsFinder, and one of 2,474 Storage mods for Fabric. 11,154 mods support Minecraft 1.20.6.
More from Hdi
Similar mods
What the author says
A Fabric library mod for Minecraft 1.20.6 that lets you store persistent, typed, schema-validated data on any ItemStack. That's it — the mod is now active. By itself it does nothing visible; it becomes useful when another mod calls its API, or when an OP uses the /itemdata commands.
Official listing
- Modrinth page
- modrinth.com/mod/custom-item-data
- Owner
- Hdi
- Published
- 2026-04-06
- Updated on Modrinth
- 2026-05-12
- Facts verified
- 2026-10-15
