ModsFinder

ClassJS

by Pelemenguin

ClassJS is a Forge addon for KubeJS that lets scripts create Java classes and build their own methods from JavaScript functions, while protecting certain bytecode instructions.

ForgeClient and serverMIT LicenseOpen source1.20.1

What it does

Scripts that use KubeJS can define new Java classes through ClassJS, and each method of those classes can be assembled from JavaScript functions. The addon works at the Java bytecode level, so a script author who wants to learn how bytecode is structured can see the instructions their functions turn into. Some instructions that touch other classes, such as static field reads, static method calls and object creation, are covered by KubeJS class filters.

Classes are only defined during startup scripts, and a class created this way cannot extend or implement other types. Scripts that run later can reach a class through the ClassJSUtils.loadClass method. Access to classes is limited to the ones KubeJS and other addons allow, which keeps the feature inside the boundaries KubeJS already sets.

The mod is published for Forge only, in the 1.20.1 game version, with 0.1-alpha.6 as the latest file, dated 2025-12-27 on the alpha channel. A server running it needs every connecting player to have it too. ClassJS is released under the MIT License and is open source; its source code is public.

Key features

  1. Java classes from scripts

    KubeJS scripts can create Java classes, so a modpack author can add logic that KubeJS alone does not expose.

  2. Methods built from functions

    Each method of a created class is assembled from JavaScript functions, which turns script code into bytecode.

  3. Filtered bytecode instructions

    Instructions that read static fields, call static methods or create objects are checked by KubeJS class filters before they run.

  4. Startup-only class definitions

    Classes are defined only in startup scripts, and they cannot extend or implement other classes or interfaces.

Compatibility

Latest build for each game version and loader.

No stable releases
Every published file is a beta or alpha build.
1.20.10.1-alpha.6
ReleaseBetaAlphaNot available

Only full game releases are shown. This mod publishes no snapshot builds.

How it compares

Full comparison

Soul Classes is a Forge mod for 1.20.1 that runs on client and server, but it is not open source and is released under All rights reserved, so its source is not available for reuse. MoreJS: KubeJS Addon covers Fabric, Forge and NeoForge for 1.18.2 – 1.21.1 under the GNU Lesser General Public License v3.0 only, so it is a different loader and version range. KubeJS itself is open source under the same license family and runs on Fabric, Forge, NeoForge and Quilt; either side can run it, and neither needs it.

ModLoadersGame versionsEnvironmentUpdated
ClassJSForge1.20.1Client and server2025-12-27
Soul ClassesForge1.20.1Client and server2024-10-09
MoreJS: KubeJS AddonFabric, Forge and NeoForge1.18.2 – 1.21.1Client and server2025-10-13
KubeJSFabric, Forge, NeoForge and Quilt1.18.2 – 26.1.2Client or server, optional2026-10-15

Questions

Does ClassJS need KubeJS?

Yes. ClassJS is an addon for KubeJS and runs through its scripting, so KubeJS must be installed on the Forge instance.

Can scripts load a class after startup?

Classes are defined only in startup scripts, but other scripts can use ClassJSUtils.loadClass to reach a class that was defined earlier.

Does the server need ClassJS for players to join?

The environment is client and server, so the server and every player must run ClassJS, and the 0.1-alpha.6 file for 1.20.1 is the only version published.

More from Pelemenguin

All projects

What the author says

ClassJS is a mod to create Java classes in KubeJS. You may operate Java byte code to build your own methods.
Pelemenguin, on the Modrinth page

Official listing

Owner
Pelemenguin
Published
2025-10-14
Updated on Modrinth
2025-12-27
Facts verified
2026-10-15