Skip to content

Releases: Prunoideae/ProbeJS

v7.0.0 (1.21)

27 Jun 01:55
5e1b298
Compare
Choose a tag to compare

v7.0.0 (1.21)

JavaScript Project

  • A separate jsconfig.json is now generated for each script type.
  • Each script type will only be able to access their own events and bindings.
  • Typing for each script type is now generated at .minecraft/.probe, instead of .minecraft/kubejs/probe.
  • Does not require you to place scripts under src/ folder anymore. However, it is still advised to do so for a better project structure.
  • Also generates a test/ folder for each script type, scripts in this folder will be able to invoke some functions for debugging.

Typing

  • Generation of class types now adapt to a more module-like manner to allow the auto-import to work.
  • Improved completion performance by over 10x via separating complex object types to individual type declarations.

Java Class Discovery

  • Decompiler now uses runtime class bytecode to generate decompiled code, meaning that most of the results is deobfuscated and well-defined.
  • Implemented a class scanner to discover mod, NeoForge and Minecraft classes in order to eliminate the need of checking registry classes or a lot of other work. Basically those are all classes you can load in the game.

require and export

  • require is largely fixed by using Rhino's parser to patch the script code.
  • ESM import is not supported due to fundamental conflicts to Rhino.
  • Scope isolation is now off by default.

VSCode Extension

  • Rewritten the extension for better VSCode-Minecraft interaction.
3.1.mp4

v7.0.0

18 Jun 08:42
Compare
Choose a tag to compare

v7.0.0

  • Final release for Minecraft 1.20.1
  • Dropped Fabric support
  • Completely rewritten the codebase to allow better codegen

TypeScript Generation

  • Declaration files are now generated in a per-script type manner.
  • You can only have type hinting for bindings you have in corresponding script types.
  • Typing generation folder is moved to .minecraft/.probe instead of .minecraft/kubejs/probe.
  • Each script folder will now have its own jsconfig.json and src folder.

Java Class Dumping

  • Largely sanitized the generated Java declarations, it now works in a nearly TS-compatible manner.
  • Java classes are now arraged in their corresponding package as modules, instead of being prefixed with Internal..
  • Reacheable classes are now all visible with the VSCode JS/TS extension.

require and import Statements

  • As the module-based TypeScript generation is now implemented, CommonJS require and ESM import statements are now supported.
  • require is an alias of Java.tryLoadClass, and can be implemented without the installation of ProbeJS.
  • import is transpiled by ProbeJS to require statements using mixins, so it will break if you don't have ProbeJS installed.
  • require and import statements enable VSCode to auto-import classes you needed in your script.
  • Transpile of import statements is only able to process single-line imports, and will not work with import * as ident from ....
  • Java.loadClass dumping support is removed in favor of require statements.

export Statements

  • To prevent namespace pollution, ProbeJS will isolate the identifiers for each script by default.
  • You can declare const ident = ... for each script without the need to worry about the global scope now with isolation.
  • To make a variable or function available to other scripts, you can use the export statement: export const/var/let/function ident ...
  • Can be disabled by /probejs scope_isolation.
  • export statements are stripped by mixin, so you can't use them without ProbeJS.

Snippets

  • Added a few snippets: #uuid, #ignored, #itemstack, #packmode, #priority, #recipes, #requires.
  • @- snippets now include @mod, @lang_key, @recipe_id, and @texture.
  • Added ProbeEvents.snippets to allow you to add your own snippets.

Document Generation

  • Documents to Java classes is now accessible from Java and JS side.
  • Removed the need of downloading document files from the remote server.
  • Added ProbeEvents.assignType and ProbeEvents.modifyClass to allow you to modify the generated Java classes.

Decompilation

  • Now includes a runtime Java decompiler (Vineflower) to allow you to decompile classes in-game.
  • Obfuscated classes will be remapped to their deobfuscated names.
  • Decompilation will provide class info to ProbeJS, allowing you to use require for almost any Java class.
  • Set probejs.enableDecompiler to true and probejs.modHash to -1 to trigger decompilation at next dump.

Linting

  • Added /probejs lint to perform linting on your scripts.
  • Linting will check for non-JS problems in your scripts. Like the redeclaration of exported variables, import conflict due to priorities, etc.
  • Auto-linting by interop with VSCode will be implemented in 1.21.

VSCode Extension

  • Does not require the installation of ProbeJS extension for any features now.
  • Extension will be rewritten to support a different set of features.

Forge Events

  • Literal support for Forge events is removed in favor of require event classes directly.

7
6

v6.0.1

01 Apr 14:03
Compare
Choose a tag to compare
  • Fixed some security problems. (#60 )
  • ProbeJS can now detect ambiguous methods and generate explicit method calls for them.

image

v6.0.0

11 Feb 12:47
Compare
Choose a tag to compare
  • Added a WebSocket server to communicate with the latest ProbeJS VSCode extension.
  • Fixed a bug in a certain field in the config file.

4

v5.9.3

23 Jan 13:06
Compare
Choose a tag to compare
  • Reworked the content of JSON to make it more readable.
  • Partial type of interfaces now generates for all interfaces that have only one abstract method without needing @FunctionalInterface.
  • Fixed an error in built-in class assignment.
  • Fixed #52, added experimental fix of #44

v5.9.0

09 Jan 13:58
Compare
Choose a tag to compare
  • Added type descriptor formatting for KubeJS events.
  • Added Remote Schema function, which allows recipe support to be added via ProbeJS directly, without addons.
  • Increased the mod count limitation from 100 to 350 as the performance of type dumps is improved.
  • Fixed any generated due to untyped parameterized types that occurred in recipe type descriptors.
  • Hardcoded most of the type assignments to reduce problem if Internet connection is not good.
  • Added type probing for TagKeyComponents without class specified.
  • Removed funny ArrayOrSelf type as recipe schemas are completely automated now.
  • Added support for typing the RecipeSchemaRegistryEventJS.

image

v5.8.0

02 Jan 17:30
Compare
Choose a tag to compare
  • Added correct typing for block entity attachments.
  • Fixed a rare case where error might be thrown due to incorrect TypeDescJS.
  • Lang file schema now also includes untranslated keys, but it requires the key itself to be constructed first (e.g. loaded by JEI/REI or shown).
  • Fixed a rare crash where some fluid might not be found in registry (???)
  • (Extension) Added ProbeJS: Populate Unlocalized Strings to generate all (or filtered) unlocalized language keys in current file.

out

v5.7.0

11 Dec 07:04
Compare
Choose a tag to compare
  • Did class refactoring for future JS typing generation.
  • Split the giant globals.d.ts into one smaller globals.d.ts and multiple internal_*.d.ts to eliminate performance issues in large packs.
  • ProbeJS now supports @Generic annotation handling from KubeJS.

v5.3.2

09 Nov 16:23
Compare
Choose a tag to compare

v5.5.0

13 Sep 09:22
Compare
Choose a tag to compare
  • First (probably stable) 1.20.1 update, yay!
  • Refactored a lot of things to make things work in 1.20.1.
  • Dropped item/fluid rendering due to rendering changes in 1.20.1.
  • (Extension) Added support for IconExporter in 1.20.1.
  • Now automatically exports docs by calling /kubejs dump_internals events.
  • (Extension) Added support for event docs dumped by KubeJS.
  • ProbeJS will not format NaN and Infinity values and format them as types now.
  • Removed a weird hardcoded String interface typing, which has been forgotten for a long time.
  • Added a special type for all java class names you might want to write.
  • Java class probing now works even without aggressive mode on. (As the performance issue should be minor)
  • Added proper docs for generic forge events.

image