Skip to content

v0.2.0

Latest

Choose a tag to compare

@Ayfri Ayfri released this 08 Oct 14:17
Immutable release. Only release title and notes can be modified.
4b0bed3

Macro checks, gutter icons everywhere and faster updates

Added

  • Macro argument checks on function(...) calls:
    • A call missing an argument the target function's macros need, with a quick-fix adding this["x"] = "" for each missing one. The macros are read from macro("x"), eval("x"), $(x) in strings, macros.x, and the project helpers the function calls.
    • An argument the function never uses, most likely a typo, with a fix renaming it to the closest missing macro.
    • arguments = storage(...) calls, checked against what the calling function writes to that storage path before the call.
    • Macros of a function's Macros class that its body never uses are greyed out.
  • Gutter icons on every declaration (advancements, loot tables, recipes, tags, load { }, ...), and hovering any Kore gutter icon shows the same card as the Kore Elements tool window.
  • The Kore Elements right-click Copy menu offers the namespace, path, tag id without #, Kotlin call, output path with its datapack folder and resource folder, plus every namespace and command under a grouping row.

Changed

  • After an edit, the Kore Elements tool window, inspections and inlay hints only re-analyze the edited file instead of the whole project, several times faster on large projects.

Fixed

  • A DataPack extension reachable from several datapacks is attributed to the one calling it most directly, instead of an arbitrary one.
  • load { } and tick { } without a name are listed in the Kore Elements tool window, and generatedFunction, load and tick show their real generated_scopes/ output path.
  • Recipes given a namespace argument, such as smelting("x", "ns"), are listed under that namespace.
  • An advancement's tick("x") trigger is no longer listed as a tick function.
  • The unresolved function quick-fixes keep a typed ns: prefix, create the missing function in the namespace the call names, and no longer add a namespace argument to an already namespaced name.
  • Function name completion keeps a typed ns: prefix, and function("ns", "...") only offers that namespace's functions.
  • Find Usages in the Kore Elements tool window lists a function's function("x") calls, and for other elements the usages of the Kotlin function declaring them instead of nothing.
  • The hover card of a nested folder such as tags/function no longer repeats part of its path.

Maintenance

  • Added an opt-in benchmark measuring element collection and highlighting on a Kore checkout.
  • Removed unused code and redundant tests.