Catalogs
Akses read-only ke tabel JSON statik yang di-bundle di binary. Tooling external bisa pull data yang sama dengan yang dipake bot buat decision — nama block, recipe, deskripsi item, definisi quest, roll pack, defs achievement.
| Method | Path | Returns |
|---|---|---|
GET | /api/catalog/block_types | block_types.json — {id: "Name"} |
GET | /api/catalog/block_flags | block_flags.json — flag bit per block |
GET | /api/catalog/items | item_database.json (alias item_database) |
GET | /api/catalog/packs | pack_pool.json (alias pack_pool) |
GET | /api/catalog/quests | quest_definitions.json (alias quest_definitions) |
GET | /api/catalog/quest_pool | quest_pool.json |
GET | /api/catalog/achievements | achievement_definitions.json (alias achievement_definitions) |
curl -s http://localhost:8090/api/catalog/items \
-H 'authorization: Bearer <token>' | jq '.WeaponPickaxeBasic'
Setiap response itu file JSON apa adanya — klien filter / index di sisi mereka. Bundle update tiap release; pin ke binary spesifik kalau butuh snapshot stabil.
Bentuk umum
block_types
{ "0": "Air", "8": "Dirt", "12": "Rock", "1041": "WeaponPickaxeBasic", ... }
items
{
"WeaponPickaxeBasic": {
"name": "WeaponPickaxeBasic",
"blockType": 1041,
"tier": "0",
"hits_required": 1000,
"level_req": null,
"description": "Just a basic pickaxe."
},
...
}
packs
{
"LureBooster": {
"name": "Lure Booster",
"byteCoinsPrice": "100",
"rolls": [...]
},
...
}
Errors
| Status | Body | Penyebab |
|---|---|---|
404 | {"error":"unknown catalog: <name>"} | Path gak match ke nama yang dilist. |
500 | {"error":"parse <file>.json: ..."} | Harusnya gak terjadi — JSON yang di-bundle udah validated pas compile. |