SpyglassMC / Spyglass

Development tools for vanilla Minecraft: Java Edition data pack developers.
https://spyglassmc.com
MIT License
310 stars 32 forks source link

Using /execute store (result|success) score <target> <scoreboard> should also define <target> #1521

Open Dahesor opened 3 months ago

Dahesor commented 3 months ago

Currently in Spyglass a score holder can be defined by running something like scoreboard players set $holder int 1, which defines $holder However running execute store result score $holder int run ... without using a scoreboard command before will not define $holder, and Spyglass will not suggest $holder in other commands and JSON files.

This should not be the case, as a new score holder can be created by using execute store.

SPGoding commented 2 weeks ago

This can be fixed by adding usageType: 'definition' to the score holder in ExecuteStoreTarget at packages/java-edition/src/mcfunction/tree/patch.ts similar to what's done for ObjectiveWriteTargets.