ProbeJS Legacy
Writing KubeJS scripts without autocomplete feels like coding blindfolded. You guess method names, mistype parameters, and debug errors that a decent IDE would have caught instantly. ProbeJS Legacy exists to fix exactly that problem, and it does so with a level of polish that has made it a staple in the toolkit of serious modpack developers.
If you have ever worked with the original ProbeJS, you already understand the concept. This project is an unofficial continuation built for KubeJS versions that the official ProbeJS no longer supports. That means players and pack authors working on older but still wildly popular modded setups finally have a maintained solution for generating rich TypeScript typings from their game instance.
What ProbeJS Legacy Actually Does
At its core, ProbeJS Legacy inspects your Minecraft instance, gathers information about classes, methods, fields, and events, and dumps all of it into .d.ts typing files. Open your instance folder in Visual Studio Code, and suddenly every KubeJS API call has autocomplete, hover documentation, and type checking.
The workflow is refreshingly simple. Install the add-on, enter a singleplayer world, and run /probejs dump. First-time users get this dump automatically upon joining a world, so there is no configuration maze to stumble through. Once the files are generated, point your editor at the instance folder and start writing scripts with real confidence.
Supported Versions and Loaders
ProbeJS Legacy targets Minecraft 1.16.5 and 1.20.1 on Forge, two versions that remain enormously popular in the modpack community. The 1.16.5 branch was the original motivation for the project, since that version lacked any proper KubeJS helper mod despite its enduring popularity. The 1.20.1 support arrived later and benefits from a more mature event collection system, where all registered KubeJS events are dumped automatically without any manual triggering.
Event Collection Differences
On 1.16.5, ProbeJS Legacy records events as they are posted, so if a common event is missing from your dump, triggering it once in-game and re-dumping solves the problem. On 1.20.1, the process is fully automatic. Forge events are captured regardless of whether they have fired, and this behavior can be adjusted through the Class Scanner config.
Improvements Over the Original ProbeJS
This is not a simple fork with a version bump. ProbeJS Legacy introduces meaningful upgrades that change how pleasant KubeJS development feels.
- Internal namespace: A simulated Internal namespace makes migrating from ProbeJS 6 or ProbeJS Legacy 3 straightforward, with familiar names like Internal.ItemStack preserved.
- Better parameter naming: Arguments stuck in
arg123format are renamed based on their type, so signatures read likemayUseItemAt(blockPos0, direction1, itemStack2)instead of cryptic placeholders. - Correct $Class handling: Transformations into
typeof Tnow respect edge cases, and basic classes such asjava.lang.Stringcan be dumped properly. - Reliable instanceof: Objects checked against classes loaded through
java(...)orJava.loadClass(...)now get accurate type inference. - Field beaning: Fields that KubeJS treats as assignable, like
obj.block = "minecraft:stone", finally receive proper typing support. - Shared typings: Common class parts are extracted, shrinking total file size and letting the TypeScript server reuse typings across script types for noticeably better IDE performance.
- Smarter file organization: Oversized declaration files are split automatically, and methods and fields are sorted naturally.
Comment formatting also received attention. Blank lines at the front and back are ignored, single-line comments stay on one line, and methods marked with @OnlyIn carry clear notes about being server-only or client-only. Global values resolve correctly too, with configurable resolving depth.
For players who prefer a frictionless setup, the foxygame.net launcher offers a one-click install path that handles ProbeJS Legacy alongside your other add-ons, so version compatibility and updates are managed without manual file juggling. It is a convenient option for anyone who would rather spend time writing scripts than configuring folders.
How to Install and Get Started
Getting up and running takes only a few minutes. Download ProbeJS Legacy for Minecraft from your preferred mod source, drop it into your mods folder alongside KubeJS, and launch the game. Join a singleplayer world to trigger the initial dump, or run /probejs dump manually whenever you need fresh data. Then open the instance folder in VS Code, where the generated typings will be picked up automatically. Other IDEs with TypeScript .d.ts support work just as well.
One small note: the instance folder is the one containing the kubejs directory directly. If your editor cannot find the typings, that is almost always the culprit.
Final Thoughts
ProbeJS Legacy solves a real, persistent pain point for KubeJS developers working on 1.16.5 and 1.20.1. By generating accurate typings, improving parameter names, and optimizing file structure for IDE performance, it turns script writing from guesswork into a genuinely productive experience. Whether you are maintaining an established modpack or experimenting with your first scripts, this add-on deserves a place in your development setup.