Skip to content

docs: add missing error documentation files and improve incomplete existing docs#26

Merged
DaanV2 merged 3 commits intomainfrom
copilot/audit-error-documentation-files
Apr 9, 2026
Merged

docs: add missing error documentation files and improve incomplete existing docs#26
DaanV2 merged 3 commits intomainfrom
copilot/audit-error-documentation-files

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

The language server maps every diagnostic code to a <code.replace(/\./g, '/')>.md path in this repo. Many of those paths were 404s or near-empty stubs, leaving IDE users with broken or useless documentation links.

New files (9)

Covers error codes that had no documentation at all:

  • behaviorpack/entity/components/deprecated.md
  • behaviorpack/biome/components/deprecated.md + climate/particles.md + pre_1.17_component.md + replace_biomes/multiple_dimensions.md
  • behaviorpack/functions/missing.md
  • resourcepack/entities/missing.md
  • minecraft/commands/syntax.md — general page for all minecraft.commands.<cmd>.syntax codes
  • minecraft/commands/obsolete.md — general page for all minecraft.commands.<cmd>.obsolete codes

Improved files (17)

Stub files expanded to include: severity, description, what triggers the error (with source references), a concrete example, fix guidance, and related error links. Files updated:

  • general/{string,integer,float,boolean}/* — all were title+code only
  • behaviorpack/entity/{event/missing,aliases,permutations,mcfunction/empty} — minimal one-liners
  • minecraft/{format_version,selector/invalid,mode/invalid} — incomplete or inaccurate
  • debugger/internal/exception, molang/optimization/constant-folding, behaviorpack/block/components/deprecated

README

Rewrote to serve as an index: error code naming convention (category.subcategory.type), severity level table, and a quick-reference table linking all major codes.

Original prompt

Problem

The Blockception Minecraft Bedrock Language Server (Blockception/minecraft-bedrock-language-server) links every diagnostic error code to a documentation page in this repository. The URL mapping logic (from ide/base/server/src/lsp/diagnostics/diagnoser.ts) works as follows:

  • For string codes: https://github.com/Blockception/Minecraft-Error-Codes/blob/main/${code.replace(/\./gi, '/')}.md
    • e.g. behaviorpack.entity.event.missingbehaviorpack/entity/event/missing.md
  • For numeric codes: https://github.com/Blockception/Minecraft-Error-Codes/blob/main/codes/main.md#${code}

Many of these documentation files are missing, incomplete, or inconsistently formatted. When users click on error codes in their IDE, they get 404 pages or unhelpful documentation.

What needs to happen

1. Audit existing files and ensure consistent formatting

Every error documentation .md file should follow this consistent template structure:

# <Error Code>

**Severity:** error | warning | info | hint

## Description

A clear explanation of what this error means.

## What triggers this error

Explanation of the specific validation logic that produces this error.

## Example

An example of code that triggers the error.

## How to fix

Step-by-step guidance on resolving the error.

## Related errors

Links to related error codes if applicable.

2. Add missing documentation files

The following error codes are produced by the language server but likely have no corresponding .md file. Each must be created at the correct path matching the dotted code:

General:

  • general/string/invalid.md — Triggered when a Minecraft string contains invalid characters (spaces without quotes, mismatched quotes). Source: packages/bedrock-diagnoser/src/diagnostics/general/string.ts — calls diagnoser.add(value, "Invalid minecraft string: '${value.text}'", DiagnosticSeverity.error, 'general.string.invalid')
  • general/integer/invalid.md — Invalid integer value
  • general/integer/minimum.md — Integer below minimum allowed value
  • general/integer/maximum.md — Integer above maximum allowed value
  • general/float/invalid.md — Invalid float value
  • general/boolean/invalid.md — Invalid boolean value

JSON:

  • json/invalid.md — Invalid JSON structure/syntax. Source: packages/bedrock-diagnoser/src/diagnostics/json/errors.ts — triggered when JSON parsing fails

Minecraft:

  • minecraft/format_version.md — Format version issues (not a string, not valid, or out of date). Source: packages/bedrock-diagnoser/src/diagnostics/general/format-version.ts
  • minecraft/selector/invalid.md — Invalid target selector syntax

Behavior Pack - MCFunction:

  • behaviorpack/mcfunction/empty.md — Empty mcfunction file that Minecraft won't load. Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/mcfunction/document.tsdiagnoser.add(0, 'Empty mcfunction found, minecraft will not load this function', DiagnosticSeverity.error, 'behaviorpack.mcfunction.empty')

Behavior Pack - Entity:

  • behaviorpack/entity/event/missing.md — Entity event referenced but not defined. Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/entity/diagnose.tsdiagnoser.add(path, 'Entity has no event "${id}"', DiagnosticSeverity.warning, 'behaviorpack.entity.event.missing')
  • behaviorpack/entity/permutations.md — Entity permutations have been deprecated. Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/entity/document.ts
  • behaviorpack/entity/aliases.md — Entity aliases have been deprecated. Source: same file
  • behaviorpack/entity/components/deprecated.md — A deprecated entity component is being used. Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/entity/components/diagnose.ts

Behavior Pack - Biome:

  • behaviorpack/biome/components/deprecated.md — Deprecated biome component (e.g. minecraft:surface_parameters, minecraft:frozen_ocean_surface, etc. replaced by minecraft:surface_builder). Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/biome/components/diagnose.ts
  • behaviorpack/biome/components/climate/particles.md — Climate particle capability moved to client_biome.json
  • behaviorpack/biome/components/pre_1.17_component.md — Pre Caves and Cliffs components that don't work with custom biomes
  • behaviorpack/biome/components/replace_biomes/multiple_dimensions.md — Using biome replacement for both Overworld and Nether is discouraged

Behavior Pack - Block:

  • behaviorpack/block/components/deprecated.md — Deprecated block components (many, including minecraft:aim_collisionminecraft:selection_box, minecraft:destroy_timeminecraft:destructible_by_mining, etc.). Source: packages/bedrock-diagnoser/src/diagnostics/behavior-pack/block/components/diagnose.ts

Dynamic "missing" codes (from packages/bedrock-diagnoser/src/diagnostics/errors/missing.ts):
The Errors.missing() utility generate...

This pull request was created from Copilot chat.

Copilot AI and others added 2 commits April 8, 2026 14:37
…mplete docs

- Create behaviorpack/entity/components/deprecated.md
- Create behaviorpack/biome/components/deprecated.md
- Create behaviorpack/biome/components/climate/particles.md
- Create behaviorpack/biome/components/pre_1.17_component.md
- Create behaviorpack/biome/components/replace_biomes/multiple_dimensions.md
- Create behaviorpack/functions/missing.md
- Create resourcepack/entities/missing.md
- Create minecraft/commands/syntax.md (general command syntax page)
- Create minecraft/commands/obsolete.md (general obsolete command page)
- Improve general/string/invalid.md with description, examples, and fix guidance
- Improve general/integer/invalid.md with description, examples, and fix guidance
- Improve general/integer/minimum.md with description, examples, and fix guidance
- Improve general/integer/maximum.md with description, examples, and fix guidance
- Improve general/float/invalid.md with description, examples, and fix guidance
- Improve general/boolean/invalid.md with description, examples, and fix guidance
- Improve behaviorpack/entity/event/missing.md with trigger details and examples
- Improve behaviorpack/entity/aliases.md with deprecation context and fix guidance
- Improve behaviorpack/entity/permutations.md with migration example to entity properties
- Improve behaviorpack/mcfunction/empty.md with trigger source and fix guidance
- Improve minecraft/format_version.md with version format docs and examples
- Improve minecraft/selector/invalid.md with detailed trigger explanation
- Improve minecraft/mode/invalid.md with description and example
- Improve debugger/internal/exception.md with actionable fix steps
- Improve molang/optimization/constant-folding.md with examples and hints
- Improve behaviorpack/block/components/deprecated.md with deprecation table
- Update README.md with full index, naming convention docs, severity table, and quick reference

Agent-Logs-Url: https://github.com/Blockception/Minecraft-Error-Codes/sessions/891ec4e6-be95-46af-bbeb-2fb52f889ee2

Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Copilot AI changed the title [WIP] Audit existing error documentation files for consistency docs: add missing error documentation files and improve incomplete existing docs Apr 8, 2026
Copilot AI requested a review from DaanV2 April 8, 2026 14:51
Copilot stopped work on behalf of DaanV2 due to an error April 8, 2026 14:51
@DaanV2 DaanV2 marked this pull request as ready for review April 9, 2026 06:03
@DaanV2 DaanV2 merged commit 5414c3b into main Apr 9, 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