Project Nashorn - JavaScript Library for Minecraft
This library-interpreter enables ECMAScript support in the CustomNPCs modification. If you have the latest Java version installed, NPC scripting functionality is likely already available after enabling ECMAScript for a specific non-player character. However, if you encounter an error when trying to create scripts, this library component is probably missing.
I'm not the original creator of this project, but merely adapted it for the convenience of modpack creators. This fully complies with the original's licensing terms - GNU General Public License version 2 (GPLv2).
Important to note: the library itself doesn't add new game content. Its purpose is to provide a JavaScript execution mechanism that other modifications like CustomNPCs can use to implement an ECMAScript engine. Theoretically, any other mod using the Nashorn Engine could also connect to this library.
Main Purpose of Project Nashorn
Nashorn's goal is to create a lightweight yet high-performance JavaScript runtime environment fully integrated with Java Virtual Machine. The development allows Java programmers to embed JavaScript into their applications through JSR-223 specification, as well as create standalone JavaScript applications using the jrunscript command-line utility.
The project is built on a completely new architecture that considers modern JVM technologies developed since the creation of the first Java-based JavaScript engines back in 1997. Primary focus is on utilizing advanced tools like MethodHandles and InvokeDynamic API described in the JSR-292 standard.