Skip to content

Commit 0768ef1

Browse files
CopilotDaanV2
andauthored
Enhance texture_not_found.md with full diagnostic coverage (#25)
* Initial plan * Enhance behaviorpack/item/components/texture_not_found.md Agent-Logs-Url: https://github.com/Blockception/Minecraft-Error-Codes/sessions/71b50b13-e4b3-47e4-90c3-1f98b5179fa7 Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
1 parent dbf6e41 commit 0768ef1

File tree

1 file changed

+71
-3
lines changed

1 file changed

+71
-3
lines changed
Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,91 @@
11
# Item - Texture not found
22

3-
The item texture shortname you have specificed could not be found in the `item_texture.json` file.
3+
`behaviorpack.item.components.texture_not_found`
44

5-
For example;
5+
**Severity:** Error
6+
7+
The item texture shortname you have specified could not be found in the `item_texture.json` file of any resource pack in the project, nor in the list of built-in vanilla texture shortnames.
8+
9+
## Trigger conditions
10+
11+
This error is raised in two situations:
12+
13+
### 1. `minecraft:icon` on a behavior pack item
14+
15+
The `minecraft:icon` component supports three formats, and the shortname is checked in each case:
16+
17+
**String shorthand** — the entire value is the texture shortname:
18+
19+
```json
20+
{
21+
"minecraft:icon": "apple"
22+
}
23+
```
24+
25+
**Object with `texture` property** — the `texture` field is the shortname:
626

727
```json
828
{
9-
"minecraft:icon": "apple"
29+
"minecraft:icon": {
30+
"texture": "apple"
31+
}
1032
}
1133
```
1234

35+
**Object with `textures` map (per-context textures)** — each value in the `textures` object is checked individually:
36+
37+
```json
38+
{
39+
"minecraft:icon": {
40+
"textures": {
41+
"default": "apple",
42+
"charged": "apple_charged"
43+
}
44+
}
45+
}
46+
```
47+
48+
### 2. Spawn egg texture on a resource pack entity
49+
50+
The same diagnostic code is also emitted when a resource pack entity's `description.spawn_egg.texture` references a shortname that cannot be found in `item_texture.json`:
51+
52+
```json
53+
{
54+
"minecraft:client_entity": {
55+
"description": {
56+
"identifier": "my_namespace:my_entity",
57+
"spawn_egg": {
58+
"texture": "my_entity_spawn_egg"
59+
}
60+
}
61+
}
62+
}
63+
```
64+
65+
## Where the shortname is resolved
66+
67+
The shortname is looked up in the `texture_data` object inside an `item_texture.json` file located in the resource pack:
68+
1369
```json
1470
{
1571
"resource_pack_name": "rp",
1672
"texture_name": "atlas.items",
1773
"texture_data": {
1874
"apple": {
1975
"textures": "textures/items/apple"
76+
},
77+
"apple_charged": {
78+
"textures": "textures/items/apple_charged"
2079
}
2180
}
2281
}
2382
```
83+
84+
Vanilla built-in texture shortnames (from the Minecraft default resource pack) are also accepted and will **not** trigger this error.
85+
86+
## How to fix
87+
88+
1. **Check for typos** in the shortname used in `minecraft:icon` (or `spawn_egg.texture`) and correct any misspellings.
89+
2. **Add the missing entry** to your resource pack's `item_texture.json` under `texture_data`, mapping the shortname to a texture path.
90+
3. **Verify the file location** — the `item_texture.json` file must be placed at `textures/item_texture.json` inside a resource pack that is included in your project.
91+
4. If you intended to reuse an existing vanilla texture, **check the vanilla shortname** matches exactly (shortnames are case-sensitive).

0 commit comments

Comments
 (0)