<----- Return to main JsMacros docs page.

Getting Started

Download

Curseforge (Mirror)

About


If you are not satisfied with the internal editor, some good editors are VS Code, Notepad++ and Sublime, or you can join the Discord and give me suggestions.

Info

I set it to be multi-threaded so that multiple scripts could run at once. This also prevents the game from crashing if you accidentally make a forever loop. Functions can't be passed between scripts, some variables can but only if they're converted to java variables first... look at the Graal JavaScript Compatibility Docs) for some raw java stuff you can do.

In the JS Compatibility docs, you may have noticed Java.type to directly grab java classes... to easier facilitate this I have created a Minecraft Mapping Viewer so you will be able to figure out the obfuscated (for fabric this is Yarn Intermediary) names of the Minecraft classes/methods/functions you wish to use. Some classes may not work with Java.type in which case you can look at the Reflection library.

you can find some reference on the difference between the JS embedded in Java and Node.js specifications here. mainly:
JavaScript code embedded in a Java application has access to limited capabilities, as specified through the Context API, and do not have access to Node.js built-in modules.
You can work around some of this, however. either by using java alternatives or finding pure js versions of them.

Feel free to join the Discord and ask any questions.

Acknolegements

JProfiler Thank You to JProfiler for usage of the Java Profiler tool for optimizing jsmacros!