
ClassJS
A KubeJS addon to create Java classes
Оцените первым
1.4K
1
1.4K
1
Список изменений
New Features
-
ClassJSUtils.loadClass- Allows to load a class that was created by
ClassCreator.
let TestClass = ClassCreator.create("TestClass") .toPublic() .defaultConstructor() .defineClass(); let loaded = ClassJSUtils.loadClass("TestClass"); console.info(loaded === TestClass); // true - Allows to load a class that was created by
-
MethodCreator.codeJSWithThis- Allows to define a method where the first parameter is
this.
let TestClass = ClassCreator.create("TestClass") .toPublic() .defaultConstructor() .createField("testField", "int") .toPublic() .build() .createMethod("testMethod", ["java.lang.String", "int"], "void") .toPublic() .codeJSWithThis((thisObj, s, r) => { // Now, `thisObj` represents the instance of TestClass console.info(s + 's'.repeat(r)); thisObj.testField = r; }) .defineClass(); - Allows to define a method where the first parameter is
Fixed Bugs
- Reloading methods written in
invokeJSthat are never used causedNullPointerException. - Specifying a method's parameter types or its return type as the currently defining class caused
TypeNotPresentException.
Файлы
classjs-1.20.1-0.1-alpha.4.jar(199.98 KiB)
ОсновнойМетаданные
Канал релиза
Alpha
Номер версии
0.1-alpha.4
Загрузчики
Forge
Версии игры
1.20.1
Загрузок
19
Дата публикации
17.10.2025
