Skip to content

fix: support quoted structure names in structure command diagnostics#456

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-mcstructure-ids
Draft

fix: support quoted structure names in structure command diagnostics#456
Copilot wants to merge 2 commits intomainfrom
copilot/fix-mcstructure-ids

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Quoted structure names in commands (e.g. structure load "mystructure:house" ~ ~ ~) triggered false "missing structure" errors because the diagnoser compared the raw token—including surrounding quotes—against stored unquoted IDs.

Changes

  • diagnose_structure_implementation — call Text.UnQuote() on the resolved ID string before all lookup checks, consistent with how other diagnosers (tickingarea, fake-entity, mcfunction, etc.) handle quoted tokens.
  • Structure diagnoser test — add a case asserting that a quoted token resolves cleanly when the unquoted ID exists in the pack.
# Before — false positive error
structure load "mystructure:house" ~ ~ ~
#              ^^^^^^^^^^^^^^^^^^^  → looked up as `"mystructure:house"`, not found

# After — no error
structure load "mystructure:house" ~ ~ ~
#                                  → stripped to `mystructure:house`, found ✓

@DaanV2 DaanV2 changed the title Fix: support quoted structure names in structure command diagnostics fix: support quoted structure names in structure command diagnostics Apr 23, 2026
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