{"id":44952,"date":"2026-06-02T06:57:02","date_gmt":"2026-06-02T03:57:02","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/"},"modified":"2026-06-02T06:57:02","modified_gmt":"2026-06-02T03:57:02","slug":"compound-key-reader","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/","title":{"rendered":"Compound Key Reader"},"content":{"rendered":"<p>## Read the keys of nbt compounds easily<br \/>\n## Command Format<br \/>\n&#8220;`mcfunction<br \/>\nfunction compound_key_reader:get {data:{from\/value:&#8230;},result:&#8217;<ResultFunction>&#8216;}<br \/>\n&#8220;`<br \/>\n+ **Result**: Save the compound as a list in `storage compound_key_reader:result keys`<br \/>\n+ + Like `key+value+seq` format:<br \/>\n&#8220;`json<br \/>\n[ { &#8220;value&#8221;: &#8220;(value)&#8221;, &#8220;key&#8221;: &#8220;(key)&#8221;, &#8220;seq&#8221;: &#8220;(seq)&#8221; }, &#8230; ]<br \/>\n&#8220;`<\/p>\n<p>## UPGRADING<br \/>\n+ If you want to upgrade from `<=Beta2.0` to `>=Beta2.1`,follow the `UPGRADE.1.md`<\/p>\n<p>## Result Functions<br \/>\n+ **The functions will beed called by the reader function to get the format of the result.**<br \/>\n+ **You can use it just like `foreach(<ResultFunction>)` in the following format**<br \/>\n+ + **You _CANNOT_ use `compound_key_reader:get` in the result function!**<\/p>\n<p>|Type       |Value      |Description                                    |<br \/>\n|&#8212;&#8212;&#8212;-:|:&#8212;&#8212;&#8212;-|:&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n|Arguments  |`c`        |Count                                          |<br \/>\n|Arguments  |`l`,`r`    |Substr cur                                     |<br \/>\n|Arguments  |`key`      |The name of the key                            |<br \/>\n|ReturnValue|`0`|`VOID`|No Result                                      |<br \/>\n|ReturnValue|+`1`       |Save substr cur((l,r]) in xx.cur               |<br \/>\n|ReturnValue|+`2`       |Save key name in xx.key                        |<br \/>\n|ReturnValue|+`4`       |Save key value in xx.value                     |<br \/>\n|ReturnValue|+`8`       |Save the sequence in the keys in xx.seq        |<br \/>\n|**Presets**|`compound_key_reader:result_preset\/key`      |key+seq      |<br \/>\n|**Presets**|`compound_key_reader:result_preset\/key-value`|key+value+seq|<br \/>\n|**Presets**|`compound_key_reader:result_preset\/all`      |(all)        |<br \/>\n+ **Substr curs**:Use `string storage compound_key_reader:result str $(l) $(r)` to get the key<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Read the keys of nbt compounds easily!<\/p>\n","protected":false},"featured_media":44953,"template":"","meta":{"_minecraft_slug":"compound-key-reader","_minecraft_project_id":"Rps00dtY","_minecraft_author":"NullSu","_minecraft_license":"BSD-2-Clause","_minecraft_downloads":292,"_minecraft_follows":1,"_minecraft_client_side":"optional","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"compound-key-reader.zip","_minecraft_size_bytes":2305313,"_minecraft_version_count":8,"_minecraft_updated_at":"2026-05-15T18:33:34.463432Z","_minecraft_date_created":"2024-12-19T21:56:24.201037Z","_minecraft_date_modified":"2024-12-18T11:04:37.969926Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/compound-key-reader","_minecraft_icon_attachment_id":44953,"_minecraft_imported_at":"2026-06-02T03:57:03+00:00","_minecraft_import_hash":"38fb73c1077ac1a6e00cf81b83ce587e","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[84,97,104,873,126,158,98,123],"mod_loader":[86,99,106,160,100],"minecraft_version":[62,37,73,74,38],"class_list":["post-44952","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-datapack","mod_category-fabric","mod_category-forge","mod_category-library","mod_category-management","mod_category-neoforge","mod_category-quilt","mod_category-technology","mod_loader-datapack","mod_loader-fabric","mod_loader-forge","mod_loader-neoforge","mod_loader-quilt","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Compound Key Reader - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Compound Key Reader - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Read the keys of nbt compounds easily!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/\",\"name\":\"Compound Key Reader - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp\",\"datePublished\":\"2026-06-02T03:57:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/compound-key-reader\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Compound Key Reader\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Compound Key Reader - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/","og_locale":"en_US","og_type":"article","og_title":"Compound Key Reader - Minecraft","og_description":"Read the keys of nbt compounds easily!","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/","name":"Compound Key Reader - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp","datePublished":"2026-06-02T03:57:02+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/compound-key-reader-icon-cd5e5f9c0c4814ca2495cdc06672e4f078c0f96b_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/compound-key-reader\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Compound Key Reader"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/44952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/44953"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=44952"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=44952"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=44952"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=44952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}