Skip to content

Enhance texture_not_found.md with full diagnostic coverage#25

Merged
DaanV2 merged 2 commits intomainfrom
copilot/enhance-texture-not-found-doc
Apr 8, 2026
Merged

Enhance texture_not_found.md with full diagnostic coverage#25
DaanV2 merged 2 commits intomainfrom
copilot/enhance-texture-not-found-doc

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

behaviorpack/item/components/texture_not_found.md was minimal and missing key diagnostic detail. Rewrites the document to accurately reflect all cases the behaviorpack.item.components.texture_not_found diagnostic covers.

Changes

  • Fix typo — "specificed" → "specified"
  • Add diagnostic codebehaviorpack.item.components.texture_not_found at the top
  • Severity — documents this as an Error
  • All three minecraft:icon formats documented with examples:
    • String shorthand: "minecraft:icon": "apple"
    • Object with texture field: { "texture": "apple" }
    • Per-context textures map: { "textures": { "default": "apple", "charged": "apple_charged" } }
  • Spawn egg coverage — same diagnostic also fires for RP entity description.spawn_egg.texture referencing an unknown shortname
  • Resolution explained — shortname is looked up in texture_data inside item_texture.json; vanilla built-in shortnames are also valid and won't trigger the error
  • How to fix section — actionable steps covering typo checks, adding missing texture_data entries, file location, and vanilla shortname casing
Original prompt

Enhance the document at behaviorpack/item/components/texture_not_found.md

The current document is minimal and needs to be enhanced with additional detail sourced from the language server's diagnostic code at Blockception/minecraft-bedrock-language-server.

Current content

# Item - Texture not found

The item texture shortname you have specificed could not be found in the `item_texture.json` file.

For example;

\```json
{
 "minecraft:icon": "apple"
}
\```

\```json
{
  "resource_pack_name": "rp",
  "texture_name": "atlas.items",
  "texture_data": {
    "apple": {
      "textures": "textures/items/apple"
    }
  }
}
\```

What the enhanced document should include

Based on the source code in packages/bedrock-diagnoser/src/diagnostics/behavior-pack/item/components/diagnose.ts (the minecraft:icon handler, lines 111-142), the diagnostic behaviorpack.item.components.texture_not_found is triggered when:

  1. The minecraft:icon component on a behavior pack item references a texture shortname that cannot be found in either:

    • The project's resource pack item_texture.json (resourcePacks.itemTextures)
    • The vanilla built-in item texture list (Vanilla.ResourcePack.TextureItems)
  2. The minecraft:icon component supports multiple formats:

    • String shorthand: "minecraft:icon": "apple" — the entire value is the texture shortname.
    • Object with texture property: "minecraft:icon": { "texture": "apple" } — the texture field is the shortname.
    • Object with textures map (per-context textures): "minecraft:icon": { "textures": { "default": "apple", "charged": "apple_charged" } } — each value in the textures object is checked individually.
  3. Additionally, this same diagnostic code (behaviorpack.item.components.texture_not_found) is also emitted for resource pack entity spawn eggs (in packages/bedrock-diagnoser/src/diagnostics/resource-pack/entity/document.ts, lines 102-116). When an RP entity's description.spawn_egg.texture references a shortname not found in item_texture.json, the same error is raised.

Requested changes

Please rewrite the document to:

  • Fix the typo "specificed" → "specified".
  • Add the diagnostic code: behaviorpack.item.components.texture_not_found.
  • Describe all three minecraft:icon format variants with JSON examples for each.
  • Add a section noting this error also applies to spawn egg textures on resource pack entities (with JSON example).
  • Explain where the shortname is resolved: the item_texture.json file in the resource pack, under texture_data.
  • Mention that vanilla/built-in texture shortnames are also accepted and won't trigger this error.
  • Add a "How to fix" section with actionable steps.

Severity

Error

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Can you enchance this document, using the source code as reference

Assistant:

Let me first load the current file and then research the source code to understand how this error is generated.

Assistant: Now I have a thorough understanding of the diagnostic code. Let me create the enhanced document as a PR.

Assistant: I've kicked off a pull request to enhance the texture_not_found.md document in the Blockception/Minecraft-Error-Codes repository. We're now waiting for your confirmation to proceed with the creation of the PR.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Enhance texture not found documentation with additional details Enhance texture_not_found.md with full diagnostic coverage Apr 8, 2026
Copilot AI requested a review from DaanV2 April 8, 2026 12:28
@DaanV2 DaanV2 marked this pull request as ready for review April 8, 2026 12:30
@DaanV2 DaanV2 merged commit 0768ef1 into main Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants