Fix structure identifiers to use namespace:identifier format#454
Fix structure identifiers to use namespace:identifier format#454
Conversation
Agent-Logs-Url: https://github.com/Blockception/minecraft-bedrock-language-server/sessions/10af970d-b266-47d6-826e-e680b918e53f Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Blockception/minecraft-bedrock-language-server/sessions/10af970d-b266-47d6-826e-e680b918e53f Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
|
@DaanV2 This change seems to have broken quoted structure identifiers. Due to MCPE-99757, structure identifiers with slashes must be quoted. Previously the language server checked for this specifically, and accepted quoted identifiers. Now it rejects them, and autocomplete suggests unquoted identifiers. |
|
@tryashtar Is there any documentation on this? I hate this back and forwards that keeps happening 😅 |
|
The only thing I'm aware of is this: https://github.com/Mojang/bedrock-samples/blob/main/metadata/command_modules/mojang-commands.json The parsers for each argument are listed. |
|
@tryashtar I have an update here: |
Structure identifiers were generated as slash-separated paths (e.g.
"puff/coin1") instead of the Minecraft Bedrocknamespace:identifierformat (e.g.puff:coin1). This caused correct usage to error and completions to suggest invalid identifiers.ID generation (
process.ts)The first folder segment after
structures/is now the namespace; the remainder is the identifier. Files directly instructures/fall back to themystructurenamespace.structures/house.mcstructurehousemystructure:housestructures/puff/coin1.mcstructure"puff/coin1"puff:coin1structures/stuff/towers/diamond.mcstructure"stuff/towers/diamond"stuff:towers/diamondDiagnosis (
diagnose.ts)Removed the slash↔colon translation logic that was converting
namespace:identifierinput into the wrong lookup key, and the spurious "needs quotes" error for slash-containing IDs. Lookup is now a direct match against the storednamespace:identifier.