轻松读取 NBT 复合标签的键
命令格式
function compound_key_reader:get {data:{from/value:...},result:'<ResultFunction>'}
- 结果:将复合标签保存为列表,存储于
storage compound_key_reader:result keys中 -
- 采用
key+value+seq格式:
- 采用
[ { "value": "(值)", "key": "(键)", "seq": "(序列)" }, ... ]
升级指南
- 若要从
<=Beta2.0升级至>=Beta2.1,请遵循UPGRADE.1.md中的说明
结果函数
- 这些函数将由读取器函数调用,以确定结果的格式。
- 你可以像使用
foreach(<ResultFunction>)一样在以下格式中使用它们 -
- 你 不能 在结果函数中使用
compound_key_reader:get!
- 你 不能 在结果函数中使用
| 类型 | 值 | 描述 |
|---|---|---|
| 参数 | c |
计数 |
| 参数 | l,r |
子串游标 |
| 参数 | key |
键的名称 |
| 返回值 | 0|VOID |
无结果 |
| 返回值 | +1 |
将子串游标((l,r]) 保存到 xx.cur |
| 返回值 | +2 |
将键名保存到 xx.key |
| 返回值 | +4 |
将键值保存到 xx.value |
| 返回值 | +8 |
将键中的序列保存到 xx.seq |
| 预设 | compound_key_reader:result_preset/key |
key+seq |
| 预设 | compound_key_reader:result_preset/key-value |
key+value+seq |
| 预设 | compound_key_reader:result_preset/all |
(全部) |
- 子串游标:使用
string storage compound_key_reader:result str $(l) $(r)获取键
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+seqformat:
- Like
[ { "value": "(value)", "key": "(key)", "seq": "(seq)" }, ... ]
UPGRADING
- If you want to upgrade from
<=Beta2.0to>=Beta2.1,follow theUPGRADE.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:getin the result function!
- You CANNOT use
| 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
版本游戏版本平台发布时间本站下载
测试版
Beta2.2+mod
Compound Key Reader Beta 2.2
1.21.41.21.3 FabricForge 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
Fabric
Forge
NeoForge
Quilt
1 年前
0
下载 Compound Key Reader
版本:Beta2.2+mod
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:Fabric、Forge、NeoForge、Quilt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta2.2
Compound Key Reader Beta 2.2
1.21.41.21.3 数据包 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
数据包
1 年前
0
下载 Compound Key Reader
版本:Beta2.2
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:数据包
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta2.1+mod
Compound Key Reader Beta 2.1
1.21.41.21.3 FabricForge 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
Fabric
Forge
NeoForge
Quilt
1 年前
0
下载 Compound Key Reader
版本:Beta2.1+mod
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:Fabric、Forge、NeoForge、Quilt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta2.1
Compound Key Reader Beta 2.1
1.21.41.21.3 数据包 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
数据包
1 年前
0
下载 Compound Key Reader
版本:Beta2.1
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:数据包
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta2.0+mod
Compound Key Reader Beta 2.0
1.21.41.21.3 FabricForge 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
Fabric
Forge
NeoForge
Quilt
1 年前
0
下载 Compound Key Reader
版本:Beta2.0+mod
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:Fabric、Forge、NeoForge、Quilt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta2.0
Compound Key Reader Beta 2.0
1.21.41.21.3 数据包 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
数据包
1 年前
0
下载 Compound Key Reader
版本:Beta2.0
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:数据包
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta1.0+mod
Compound Key Reader Beta 1.0
1.21.41.21.3 FabricForge 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
Fabric
Forge
NeoForge
Quilt
1 年前
0
下载 Compound Key Reader
版本:Beta1.0+mod
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:Fabric、Forge、NeoForge、Quilt
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
测试版
Beta1.0
Compound Key Reader Beta 1.0
1.21.41.21.3 数据包 1 年前 ·
0
1.21.4
1.21.3
1.21.2
1.21.1, 1.21
数据包
1 年前
0
下载 Compound Key Reader
版本:Beta1.0
游戏版本:1.21.4、1.21.3、1.21.2 等
平台:数据包
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
Beta2.2+mod
测试版
2024-12-18
功能
- 为结果函数添加
key参数
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
Retina
Nico314159
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
前置实用
28
数据包
Xaero's Map Server Utils
xxtg666
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
管理实用
12
数据包
Graves
efeketket
这个数据包会在玩家死亡时生成一个坟墓,安全地保存他们的物品。无需担心丢失,随时取回你的财物!
冒险玩法机制
10
数据包
[NRGD]NRG Core datapack
NimShade
我的“NRG”整合包的核心数据包。这个整合包的主要更新就在这里。
玩法机制管理
9
数据包
Vaultify
lowkeyf5
按计时器或按需自动扫描并重置试炼密室金库——无需手动操作。
玩法机制管理
7
数据包
Happy Ghasts
Immodial
添加了来自 Minecraft Live! 的干 Ghast、Ghastling 和 Happy Ghast。
冒险生物
7
评论 0
登录后参与评分
还没有评论,来抢沙发吧