COWMODSКаталог модов

Compound Key Reader

Read the keys of nbt compounds easily!

Автор: NullSu4471обновлён 18 дек. 2024 г.
Библиотеки

Описание

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!
TypeValueDescription
ArgumentscCount
Argumentsl,rSubstr cur
ArgumentskeyThe name of the key
ReturnValue0|VOIDNo Result
ReturnValue+1Save substr cur((l,r]) in xx.cur
ReturnValue+2Save key name in xx.key
ReturnValue+4Save key value in xx.value
ReturnValue+8Save the sequence in the keys in xx.seq
Presetscompound_key_reader:result_preset/keykey+seq
Presetscompound_key_reader:result_preset/key-valuekey+value+seq
Presetscompound_key_reader:result_preset/all(all)
  • Substr curs:Use string storage compound_key_reader:result str $(l) $(r) to get the key

Галерея

Use In The Game

Последние версии

Все версии →
beta

Compound Key Reader Beta 2.2

Beta2.2+mod
18 дек. 2024 г.227Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric, forge, neoforge, quilt
Скачать
Что нового
## Function 1. Add `key` argument to the result function
beta

Compound Key Reader Beta 2.2

Beta2.2
18 дек. 2024 г.30Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
## Function 1. Add `key` argument to the result function
beta

Compound Key Reader Beta 2.1

Beta2.1+mod
16 дек. 2024 г.46Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric, forge, neoforge, quilt
Скачать
Что нового
1. Set the data swap dimension to `by_redstoneore:dataswap`
beta

Compound Key Reader Beta 2.1

Beta2.1
16 дек. 2024 г.16Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
1. Set the data swap dimension to `by_redstoneore:dataswap`
beta

Compound Key Reader Beta 2.0

Beta2.0+mod
16 дек. 2024 г.44Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric, forge, neoforge, quilt
Скачать
Что нового
## Debug 1. Fix: Sometimes the keys with `:` are read incorrectly. ## Description 1. Added `compound_key_reader:result_preset/all` and _foreach_ in `README.md` ## Functions 1. Add result preset function `compound_key_reader:result_preset/all`
beta

Compound Key Reader Beta 2.0

Beta2.0
16 дек. 2024 г.20Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
## Debug 1. Fix: Sometimes the keys with `:` are read incorrectly. ## Description 1. Added `compound_key_reader:result_preset/all` and _foreach_ in `README.md` ## Functions 1. Add result preset function `compound_key_reader:result_preset/all`
beta

Compound Key Reader Beta 1.0

Beta1.0+mod
15 дек. 2024 г.41Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4fabric, forge, neoforge, quilt
Скачать
Что нового
# Functions 1. Add `compound_key_reader:get` 2. Add preset `compound_key_reader:result_preset/key` and `compound_key_reader:result_preset/key-value`
beta

Compound Key Reader Beta 1.0

Beta1.0
15 дек. 2024 г.23Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
# Functions 1. Add `compound_key_reader:get` 2. Add preset `compound_key_reader:result_preset/key` and `compound_key_reader:result_preset/key-value`