Something went wrong. Try again.
Monorepo for PackTools - tooling for Minecraft Modpacks!
Something went wrong. Try again.
Diagnostic codes #
Every PackLSP diagnostic has a stable code. These are the codes that exist today; each section names the format it belongs to.
| Code | Default severity | Meaning |
|---|---|---|
| General | ||
| PL0001 | error | File is not valid UTF-8. |
JSON family (JSON, JSONC, JSON5, .mcmeta; Strict = pack.json, *.bun.json, pw.lock) |
||
| PL1001 | error | Syntax error. |
| PL1002 | error (Strict) / info (game JSON) | Comment where the dialect does not allow one. Allowed in JSONC and JSON5, and in .json files under config/. |
| PL1003 | error (Strict) / warning (game JSON) | Trailing comma. Quick fix removes it. |
| PL1004 | error (Strict) / warning | Duplicate key. |
| PL1005 | error (Strict) / warning | Byte order mark. Quick fix removes it. |
| PL1006 | error (Strict, JSONC) / warning (game JSON) | JSON5-only syntax: single quotes, unquoted keys, hex numbers, Infinity, … |
| TOML | ||
| PL1101 | error | Syntax error. |
| PL1102 | error | Duplicate key, or a table defined twice. |
| .properties | ||
| PL1201 | error | Invalid escape. |
| PL1202 | warning | Duplicate key. |
| Schema | ||
| PL2001 | error / warning | Wrong value type. A warning for a quoted boolean or a bare value where a string belongs: older Gson-based loaders accept these, newer codec-based ones do not. Quick fixes add or remove the quotes, and rewrite a removed {"item": …}/{"tag": …} ingredient as "id"/"#tag". |
| PL2002 | error | Missing required property. |
| PL2003 | warning / info / error (set per schema) | Unknown property. Info in Packwand files (Packwand keeps unknown members) and in vanilla resources (the game ignores them); error in packeater.json, since Packeater rejects them. |
| PL2004 | error | Value not in the allowed set. |
| PL2005 | error | String does not match the required pattern. |
| PL2006 | error | Number or string length out of range. |
| PL2007 | error | Array too short or too long. |
| PL2008 | error | Value matches none of the allowed shapes, or more than one. |
| PL2009 | warning | Deprecated property. |
| PL2010 | error / warning | Unknown identifier: a vanilla id that does not exist in this Minecraft version and is not defined by the pack. A warning for tags, generated trim sprites and sound files, which mods often add. Includes a "did you mean" suggestion, also offered as a quick fix. |
| PL2011 | warning | Field that this Minecraft version does not read (removed earlier, or added later). |
| PL2012 | warning / info | (with mod jars) A namespace that no installed mod, data pack or script provides, e.g. a typo such as aethr: or a mod that is not in the pack. Ids from mods a file's load conditions require (forge:mod_loaded, fabric:all_mods_loaded) are skipped, and so are namespaces that may belong to a jar PackLSP did not find. Info when some jars could not be read. |
| PL2013 | info / hint | (with mod jars) An id in a known mod namespace that is not among that mod's files: models, blockstates, data files, sounds.json and translation keys. Only reported for registries the mod ships files for at all. Mods can register content in code with no file, so this is info, or a hint for script strings whose registry PackLSP cannot tell. |
| Packwand | ||
| PL3001 | error / info | pack-format is unknown, discontinued (packwiz era), too old, newer than Packwand reads (pwf:32, pw:30, bundle:30), or read-only (pw:/bundle: 28–29); a pack.json declares pwf:31, which only a project's manifest.json declares; or a manifest's pack_format is not pwf:31 (older formats belong in each pack.json, newer ones need a newer Packwand). |
| PL3002 | error / hint | Sidecar chosen names a provider that update does not list, or names the default (first) provider, which Packwand drops. |
| PL3003 | error / warning | Sidecar dependency path is unsafe, or points at a sidecar that does not exist. |
| PL3004 | warning | Download hash is not sha512, so Packwand cannot lock it. |
| PL3005 | warning | Sidecar has no provider coordinate (update) and no download.url. |
| PL3006 | hint | side: "either" is an alias; Packwand writes both. Quick fix changes it. |
| PL3007 | warning | packwiz file (pack.toml, index.toml, *.pw.toml). Packwand no longer reads these. |
| PL3008 | warning | Sidecar filename is missing or empty. |
| PL3009 | info | Workspace manifest $schema points at a file that does not exist. |
| PL3010 | warning / info | versions problem: minecraft missing, a version PackLSP has no version-specific checks for, or an unknown key. |
| PL3011 | info / warning | Finding from packwand lock check, which runs when you save. A pinned file that no longer matches the lock is a warning. |
| PL3012 | info / warning | A pw:/bundle: pack's sidecar has pin, chosen or dependencies, which only pwf:30 sidecars keep. |
Core shaders (.vsh, .fsh, .glsl; models: A = 1.20.1, A1 = 1.21.1, B = 26.1.2/26.2, C = 26.3) |
||
| PL7001 | error / warning | #version missing, not first, or not the version's GLSL (150 before 26.1, 330 after). Quick fix writes the right line. |
| PL7002 | error | 26.3 shader without #extension GL_ARB_separate_shader_objects : require. Quick fix adds it. |
| PL7003 | error | Wrong import directive: #include before 26.3, #moj_import in 26.3. Quick fix swaps it. |
| PL7004 | error | Include not found in the pack or in vanilla for this version. |
| PL7005 | error | Included file does not end with a newline (before 26.3). |
| PL7006 | error | 26.3: a pack include without an include guard is included more than once. |
| PL7007 | error | The same name is declared by two included files. |
| PL7008 | warning | Include guard checks one macro but defines another. |
| PL7009 | error | Unbalanced #if/#endif. |
| PL7010 | warning | Before 26.1: a used uniform is not listed in the program JSON, so the game never sets it. |
| PL7011 | error | Uniform removed or moved in this version (IViewRotMat, FogStart, ChunkOffset, …), or a loose uniform that 26.x only provides inside a uniform block. |
| PL7012 | error | Uniform block layout differs from the game's std140 layout. |
| PL7013 | warning | Uniform block the game does not bind to core shaders. |
| PL7014 | error | Game uniform or include function used without the include or declaration that provides it; names the include. |
| PL7015 | error | 26.3 stage in/out without layout(location = N). |
| PL7016 | error / warning | Stage interface mismatch: fragment input with no matching vertex output (by name, or by location on 26.3), or an unknown vertex attribute. |
| PL7017 | warning | Core shader name that does not exist in this version, so the file is never loaded. Quick fix renames known renames (rendertype_clouds → clouds, …). |
| PL7018 | warning | Program .json in shaders/core/ on 26.x, where it is ignored. |
| PL7020 | error | Sodium installed and the pack replaces a shader Sodium bypasses (rendertype_solid, terrain, …). Quick fix adds it to sodium.ignored_shaders. |
| PL7021 | warning | Sodium installed and the pack replaces light.glsl/fog.glsl, which Sodium does not use for terrain. Same quick fix. |
| PL7022 | info | assets/sodium/shaders/** in a pack, which Sodium never reads (it loads from its jar). |
| PL7023 | error | Post pass reads and writes the same target. |
| PL7024 | error | Program JSON points at a vertex/fragment shader that does not exist. |
| PL7025 | error | Program uniform count does not match its number of values. |
KubeJS (kubejs/{startup,server,client}_scripts/**/*.js; KubeJS 6 = 1.20.1, 7 = 1.21.1, 8 = 26.1.2) |
||
| PL8001 | error | Event used in a script folder where it never fires (e.g. StartupEvents.registry in server_scripts). |
| PL8002 | error | Unknown event in a built-in group, or in a group of a KubeJS addon PackLSP read from its jar; quick fix applies the suggestion. Not for groups of addons whose code PackLSP could not fully follow. |
| PL8003 | hint / warning | Event group that is not built into KubeJS. When PackLSP read every mod jar of the pack and every KubeJS addon among them (their event groups come from the jars): a warning, since no installed mod provides it. Otherwise a warning when it belongs to a well-known addon that is not installed, else a hint. |
| PL8004 | error | Missing id argument for events that need one (StartupEvents.registry('item', …)), or an id passed to an event that takes none. |
| PL8005 | error | Global function removed in KubeJS 6 (onEvent, java, onForgeEvent). Quick fix turns java(…) into Java.loadClass(…). |
| PL8006 | error / warning | Group or binding from another KubeJS version (ForgeEvents → NativeEvents, JEIEvents → RecipeViewerEvents, …). Quick fix renames ForgeEvents/ForgeModEvents to NativeEvents. |
| PL8007 | error | KubeJS 7+: writing global outside startup scripts (it is read-only there). |
| PL8008 | error | require() without ProbeJS installed (ProbeJS provides that binding). |
| PL8009 | error | Java.loadClass of a class KubeJS's class filter blocks (KubeJS 7+). |
| PL8010 | error / info | Script header: non-numeric // priority:, or // ignored: true. |
| PL8011 | info | // requires: mod names a mod no installed project matches, so the script never loads. |
| PL8012 | error | KubeJS 6: syntax its Rhino cannot parse (class, async/await, ...), checked against the Rhino 2001 parser source. |
| PL8013 | warning | No KubeJS build exists for this Minecraft version, or KubeJS is not installed in the pack. |
| PL8014 | warning | ServerEvents.tags('<registry>', …) given an id from another registry, such as an item in a fluid tag event, which KubeJS ignores. Counts entries of named lists too, including lists built in another script. |
| PL8015 | error / warning | A top-level name declared in two scripts of one folder. All scripts of a folder share one scope, so a second const/let/class fails to load (error) and a second function/var replaces the first (warning). |
| PL8016 | error / warning | A script uses, while it loads (not inside a handler), a top-level name another script declares. Error when that script loads later. Warning on KubeJS 6 when both share a priority, because KubeJS 6 loads equal priorities in file system order. |
| PL8017 | warning | The same id twice in an array passed straight to add, remove, removeAll, removeAllTagsFrom or hide (a tag list, say), where the second one does nothing. Ingredient lists are left alone: there the same item twice means two of it. |
| PL8018 | warning | removeAllTagsFrom(…) or removeAll(tag) that runs after an earlier add (in load order, or earlier in the same handler) and so undoes it. Removing first and then adding is fine. |
| PL8019 | error | A binding used in a script folder where KubeJS does not define it, from the branches in KubeJS's plugin classes: on KubeJS 6, ForgeEvents, ForgeModEvents and onForgeEvent exist only in startup scripts and settings only in server scripts; setTimeout and the other timers are not in startup scripts. |
| PL8020 | warning | A class string that does not resolve, in Java.loadClass, ForgeEvents.onEvent/ForgeModEvents.onEvent or NativeEvents.onEvent. Loader classes (net.minecraftforge., net.neoforged.) are checked against the tier's Forge/NeoForge class list, and mod classes against the mod jars when PackLSP found them. An inner class written with . gets a quick fix to $. |
| PL8021 | error | A string KubeJS cannot convert to what it is passed as, read the way KubeJS's own reader reads it (Java parameter types and recipe schema keys from the pinned KubeJS jar). Since KubeJS 7: a tag, @mod, %tab or regex where an item stack is read, and a count (2x) on a plain Ingredient (counts work for sized ingredients, such as shapeless recipe inputs). KubeJS 8: an empty ingredient ("", -, air, []) where one is required. KubeJS 6: anything that is not an id, tag, mod, tab or regex where an Ingredient is read. |
| PL8022 | warning | @mod in an ingredient string names a mod id no installed jar declares, so it matches no items. Only when PackLSP read every jar of the pack. |
| PL8023 | error | A recipe function (event.smelting(…), event.recipes.<namespace>.<type>(…)) called with a number of arguments none of its constructors take, from the recipe schema (shipped in KubeJS 7+, transcribed from KubeJS 6's code). KubeJS throws. Recipe types of addons PackLSP has no schema for are not checked. |
| PL8024 | info | A member a fully known KubeJS class does not have (event.smeltingg(…)), found by following the script's values through variables, calls and callbacks. Reading it gives undefined, calling it throws. Only for values of a class (not an interface: Minecraft's own classes implement KubeJS's *KJS interfaces) whose members and supertypes are all in PackLSP's data, and only when PackLSP read every mod jar of the pack and every KubeJS addon among them; classes an addon's mixins change are left out. |
| PL2010 | warning | (in scripts) A minecraft: id or tag in a string that does not exist in this version and is not defined by the pack or its scripts. Strings passed to a user function whose parameter only feeds a template or + (an id prefix such as 'minecraft:golden') are not ids. |
ZenScript (scripts/**/*.zs; CraftTweaker 14 = 1.20.1, 21 = 1.21.1) |
||
| PL9001 | error | Syntax error. |
| PL9002 | error / warning / info | Preprocessor problem: a misspelled name (CraftTweaker then treats the line as a comment), a non-numeric #priority, an unknown #loader, #modloaded naming mods that are not installed, or an unbalanced #onlyif/#endif. |
| PL9003 | error / warning / hint | Bracket problem: no type, a misspelled type, the tag syntax of the other CraftTweaker version (<tag:items:…> on 14, <tag:item:…> on 21), <ore:…>, or an addon bracket PackLSP cannot check. |
| PL9004 | error / warning | Unknown vanilla id in a bracket, an invalid block state property or value, or a vanilla tag that does not exist. |
| PL9005 | error | Import of a CraftTweaker type that does not exist in this version; suggests the type's current package. |
| PL9006 | warning | Member that a type does not have, found by following documented return types along method chains. |
| PL9007 | error / warning | 1.12-era ZenScript: zenClass, the global recipes API. |
| PL9008 | warning | No CraftTweaker build exists for this Minecraft version, or CraftTweaker is not installed in the pack. |
| PL9009 | warning | A call that does nothing in this CraftTweaker version, e.g. addGlobalAttributeModifier and the other global attribute methods on 1.21.1 (deprecated as no longer working; use item components). |
| Pack layout | ||
| PL6001 | warning | File sits in a folder this Minecraft version does not read: plural vs singular data folders (1.21), worldgen/configured_feature → worldgen/feature (26.3), assets/<ns>/items/ before 1.21.4. Quick fix moves the file to the folder this version reads. |
| PL6002 | error / warning | Blockstate variant or multipart condition (or OptiFine matchBlocks) names a property value the block does not have (error), or a property it does not have (warning, as some mods add properties to vanilla blocks). |
| PL6003 | warning | Lang string with a format the game cannot apply (%d, %f, a lone %) alongside arguments: the text is shown as written and its arguments are dropped. Quick fix switches to %s and doubles lone %. |
| PL6004 | warning | Lang file the game never loads: an uppercase name (en_US.json, which only loads on case-insensitive file systems; quick fix renames it) or a pre-1.13 .lang file. |
| PL6005 | error / warning | sounds.json: a name ending in .ogg (quick fix drops it), an event reference that is not in vanilla or the pack, or a file in a namespace the pack ships sounds for that is missing. |
| PL6006 | error | OptiFine CTM method or CIT type the format does not have. |
| PL6007 | error | OptiFine CTM tile, or CIT texture or model, that does not exist in the pack or vanilla. |
| PL6008 | error | OptiFine CTM tiles lists fewer tiles than the method reads (47 for ctm, 5 for ctm_compact, 4 for horizontal/vertical, …). |
| pack.mcmeta | ||
| PL4001 | error | Pack format fields are inconsistent (rules ported from Packeater, following Minecraft's PackFormat). |
| PL4002 | warning | Declared format range does not include the pack's Minecraft version. |
| Mod configs | ||
| PL5001 | error | Value outside the #Range: written in the config. Quick fix clamps it to the nearest bound. |
| PL5002 | error | Value not in #Allowed Values: (case-insensitive, as Forge reads it). Quick fix picks the closest allowed value when it looks like a typo. |
| PL5003 | warning | Fractional or boolean value where the range expects a whole number. |
| PL5004 | info | No installed project seems to own this config. |
| PL5005 | warning / info | server.properties key the server does not read in this version: a warning with a quick fix when it looks like a typo of a real key, otherwise info (mods may read it). |
| PL5006 | warning | server.properties key from another version: removed (pvp, allow-nether, … became game rules in 1.21.9) or added later (log-ips, pause-when-empty-seconds, …). |
| PL5007 | warning | server.properties value of the wrong type or out of range; the server uses the default instead. |
PackFMT (packlsp fmt; KubeJS .js and ZenScript .zs; see packfmt.md) |
||
| PF0001 | warning | File is not formatted. Reported by packlsp fmt --check; packlsp fmt fixes it. |
| PF0002 | info | Syntax error (or Rhino-only syntax the parser cannot read), so only whitespace was formatted. |
| PF0003 | warning | PackFMT refused its own result because a safety check failed (the token stream, a comment or a KubeJS header property would change, or formatting twice would differ). The file was left as it is. This is a PackFMT bug; please report it with the file. |
| PF0004 | warning | Invalid setting in the .packlsp.json "format" object. The default is used instead. |
| PF0101 | warning | (style) Comment block longer than maxCommentLines (5): own-line // comments on consecutive lines, or one multi-line /* */. Trailing comments, packfmt- pragmas and KubeJS header settings (// priority: …) do not count. Commented-out code counts; when a block is only code (it parses, and no line is a bare word), a quick fix deletes it. |
| PF0102 | info | (style) Line longer than lineLength (120 characters). Not reported when the limit falls inside a string, template or regex, for a comment holding a URL, or for a ZenScript import. |
| PF1001 | info | (style) var declaration. |
| PF1002 | off | (style) == or != (comparisons with null aside). Off unless a severity setting names it: in KubeJS a Java string and a JS string can be unequal under ===. |
| PF1003 | warning | (style) An if, else, for or while body on its own line without braces. A body on the same line (if (x) return) is fine. |
| PF1004 | hint | (style) Script of five or more lines with no header comment before the code. |
| PF1005 | hint | (style) Top-level const holding a literal whose name is not UPPER_SNAKE_CASE ($-prefixed Java class handles aside). A quick fix renames it, and its uses in the other scripts of the same KubeJS folder (they share one scope); it is not offered when a use is a shorthand property ({ name }), a script of the folder does not parse, or the new name is taken. |
| PF1006 | hint | (style) KubeJS template residue: the "Visit the wiki" comment or the example script's "Hello, World!" line. Quick fix deletes it. |
| PF1007 | hint | (style) A KubeJS header setting (// priority:, // ignored:, // packmode:, // requires:) after the code. KubeJS reads it anywhere; it belongs in the header. |