跳到正文

Compound Key Reader

作者:NullSu

Read the keys of nbt compounds easily!

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Read the keys of nbt compounds easily

Command Format

function compound_key_reader:get {data:{from/value:...},result:'<ResultFunction>'}
  • Result: Save the compound as a list in storage compound_key_reader:result keys
  • + Like key+value+seq format:
[ { "value": "(value)", "key": "(key)", "seq": "(seq)" }, ... ]

UPGRADING

  • If you want to upgrade from <=Beta2.0 to >=Beta2.1,follow the UPGRADE.1.md

Result Functions

  • The functions will beed called by the reader function to get the format of the result.
  • You can use it just like foreach(<ResultFunction>) in the following format
  • + You _CANNOT_ use compound_key_reader:get in the result function!

|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) |

  • Substr curs:Use string storage compound_key_reader:result str $(l) $(r) to get the key

常见问题

Compound Key Reader 支持哪些 Minecraft 版本?

Compound Key Reader 支持 Minecraft Java 版 1.21–1.21.4,共 5 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Compound Key Reader 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

NullSu 的其他作品

查看全部 →