Compound Key Reader
by NullSu
Compound Key Reader is a library for datapacks and mods that reads keys and values from NBT compounds stored in command storage.
What it does
The library exposes reader functions that walk through NBT compound data, so a script can read a key, a value and a sequence position in one pass. Results are written back to storage under a result key, where other functions can pick them up. Only the server needs the library: players join without installing anything, while the server must run it.
The mod is published for Fabric, Forge, NeoForge and Quilt, and as a data pack for server platforms. Files cover 1.21 – 1.21.4, with Beta2.2+mod for 1.21.4 as the latest build from 2024-12-18. The code is under the BSD 2-Clause License and is open source, with public source code and an issue tracker.
Key features
Compound key reading
Reads keys and values from NBT compounds, so a script can address data inside a compound by its key.
Result storage
Saves the output of a read into storage under a result key, where later functions can retrieve it.
Key, value and sequence format
Iterates a compound list with each entry given as key, value and sequence position, in a foreach-style loop.
String substring access
Extracts part of a stored string between two positions and saves the piece under a key of its own.
Gallery
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Use cases
Datapack scripts reading nested data
Scripts that need values buried in compound lists can read them without hand-written paths for each entry.
Who it’s for: Datapack authors and mod developers who handle NBT compound lists in command storage and want a shared reader instead of custom code. Server owners who run datapacks that depend on it must install the library on the server.
Questions
Does a player need to install Compound Key Reader?
Which loaders is Compound Key Reader available for?
Should an existing user upgrade to Beta2.1 or later?
In the catalog
Compound Key Reader is one of 3,514 Library mods on ModsFinder, and one of 2,348 Library mods for Fabric. 17,979 mods support Minecraft 1.21.4.
More from NullSu
Similar mods
Official listing
- Modrinth page
- modrinth.com/mod/compound-key-reader
- Owner
- NullSu
- Published
- 2024-12-14
- Updated on Modrinth
- 2024-12-18
- Facts verified
- 2026-10-15
