Skip to content

/pkl dump

Stop typing item ids blind. /pkl dump exports every registry id of the running modpack as PKL modules to config/pkl4mc/registries/: items, blocks, fluids, tags, biomes, recipe types, and more (20 modules). The PKL language server picks them up natively, so any editor with a PKL extension autocompletes and validates real ids from your pack, mods included.

/pkl dump

The dump survives restarts. Re-run it after adding or removing mods.

No-import completion

The dump also rewrites schemas/reg_ids.pkl, which types every ingredient field in the recipe dialect. Plain strings autocomplete and validate with no imports at all:

amends "@pkl4mc/recipes.pkl"

shapeless {
  new {
    name = "example"
    inputs { new { item = "" } }        // completion inside the quotes, all 11k ids
    output { item = "gtceu:stee" }      // wrong or incomplete id, red squiggle
  }
}

The full-id popup takes about 2 seconds to build each time it opens (a pkl-lsp cost, one union of every item). Type on without dismissing it, the filtering is instant. Item and fluid ids validate strictly. Tag fields also accept unknown ids, since datapacks add tags the dump can’t know yet.

Staged, faster completion

Importing the registry modules gives snappier completion. Ids are grouped by namespace (items.<mod>.<path>), so completion never crosses a : (colons abort VS Code’s filtering, and paths with /, . or - get backticks inserted for you):

import "@reg/items.pkl" as items
import "@reg/item_tags.pkl" as itemTags

output { item = items.gtceu.steel_ingot }              // mod list, then that mod's ids
inputs { new { tag = itemTags.forge.`ingots/iron` } }
local typed: items.Id = "minecraft:stonee"             // typo, red squiggle

Exported modules

Registries: items, blocks, fluids, entity types, enchantments, mob effects, potions, sound events, particle types, recipe types, recipe serializers, biomes, structures, damage types. Tags: item, block, fluid, entity type, biome.

Workflow

  1. Run /pkl dump in-game once.
  2. Open config/pkl4mc/ as your editor workspace root.
  3. Done. No “Sync Projects” click, pkl4mc pre-writes the language server’s project state on every boot.
The runtime never validates against the dump. A stale dump only affects editor completion and cannot break world loads.