feat(item): add item manager with JSON asset loading

Implement ItemManager to load and query item definitions from assets/item JSON files. Add ItemData struct, item asset metadata, CMake source registration, and initialize the manager during app startup. Also add AGENTS.md repository guidelines.
This commit is contained in:
2026-08-04 14:24:10 +08:00
parent 5e7c6ec891
commit 2358cfd9a4
16 changed files with 469 additions and 1 deletions

5
assets/item/air.json Normal file
View File

@@ -0,0 +1,5 @@
{
"id": 0,
"name": "air",
"description": ""
}

6
assets/item/dirt.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 2,
"name": "dirt",
"description": "",
"texture": "texture/item/block/dirt.png"
}

6
assets/item/grass.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 9,
"name": "grass",
"description": "",
"texture": "texture/item/block/grass.png"
}

View File

@@ -0,0 +1,6 @@
{
"id": 1,
"name": "grass_block",
"description": "",
"texture": "texture/item/block/grass_block.png"
}

6
assets/item/leaf.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 6,
"name": "leaf",
"description": "",
"texture": "texture/item/block/leaf.png"
}

6
assets/item/log.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 5,
"name": "log",
"description": "",
"texture": "texture/item/block/log.png"
}

6
assets/item/sand.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 4,
"name": "sand",
"description": "",
"texture": "texture/item/block/sand.png"
}

View File

@@ -0,0 +1,6 @@
{
"id": 8,
"name": "snowy_grass_block",
"description": "",
"texture": "texture/item/block/snowy_grass_block.png"
}

6
assets/item/stone.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 3,
"name": "stone",
"description": "",
"texture": "texture/item/block/stone.png"
}

6
assets/item/water.json Normal file
View File

@@ -0,0 +1,6 @@
{
"id": 7,
"name": "water",
"description": "",
"texture": "texture/item/block/water.png"
}