HomeJavaDatapacksCompound Key Reader
Compound Key Reader
DatapacksJava

Compound Key Reader

by NullSu · on Modrinth

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.21–1.21.4 · Data pack⬇ Download for 1.21–1.21.4 · Fabric⬇ Download for 1.21–1.21.4 · Forge⬇ Download for 1.21–1.21.4 · NeoForge⬇ Download for 1.21–1.21.4 · Quilt
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Read the keys of nbt compounds easily

Command Format

function compound_key_reader:get {data:{from/value:...},result:'<ResultFunction>'}
[ { "value": "(value)", "key": "(key)", "seq": "(seq)" }, ... ]

UPGRADING

Result Functions

Type Value Description
Arguments c Count
Arguments l,r Substr cur
Arguments key The name of the key
ReturnValue 0|VOID No Result
ReturnValue +1 Save substr cur((l,r]) in xx.cur
ReturnValue +2 Save key name in xx.key
ReturnValue +4 Save key value in xx.value
ReturnValue +8 Save the sequence in the keys in xx.seq
Presets compound_key_reader:result_preset/key key+seq
Presets compound_key_reader:result_preset/key-value key+value+seq
Presets compound_key_reader:result_preset/all (all)
Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more