此库/解释器用于启用 CustomNPCs 的 ECMAScript。如果你使用的是最新版本的 Java,那么在 NPC 上启用 ECMAScripts 后,你很可能已经能够为 NPC 编写脚本了。然而,如果你尝试为 NPC 编写脚本但无法操作,那你很可能是缺少了这个库/解释器。相关细节如下所述。本文件并非由我创建,我只是将其移植到 Curse 以便整合包制作者使用。这能更方便地制作整合包。根据该库/解释器的许可条款,这是允许的。
根据许可要求,我也将此项目的许可设置为使用 GNU 通用公共许可证第 2 版(GPLv2)。
它本身不会执行任何操作。CustomNPCs 会直接挂钩到此库并“开启” ECMAScript 引擎。如果其他模组实现了 Nashorn 引擎,它们也将与此挂钩。据我所知目前没有这样的模组,但也可能存在。
Project Nashorn
Nashorn 的目标是在具有原生 JVM 的 Java 中实现一个轻量级高性能 JavaScript 运行时。该项目旨在通过 JSR-223 使 Java 开发者能够在 Java 应用程序中嵌入 JavaScript,并使用 jrunscript 命令行工具开发独立的 JavaScript 应用程序。
本项目旨在充分利用自基于 JVM 的 JavaScript(最初由 Netscape 于 1997 年开始开发并由 Mozilla 维护)以来,原生 JVM 所采用的新技术。本项目将是一个全新的代码库,专注于这些较新的技术。特别是,该项目将利用 JSR-292 中描述的 MethodHandles 和 InvokeDynamic API。
This Library/Interpreter is used to enable the CustomNPCs EMCAScript. If you are running the latest version of Java chances are you are already able to script NPCs once you enable EMCAScripts on the NPC. However, if you are attempting to script an NPC and it does not allow you to do so, chances are you are missing this Library/Interpreter. The details of this are listed below. I did not create this, I simply ported it to Curse for Modpack Creators. It makes it easier for creating a modpack. This is ALLOWED by terms of this Library/Interpreters licence.
As per the licence requirements I have also set this project's licence to use the GNU General Public License version 2 (GPLv2)
This does not do anything on its own. Quite literally CustomNPC hooks into it and "turns on" the EMCAScript engine. If other mods implement a Nashorn Engine they will hook into this as well. Personally, I am not aware of any, but there may be some out there.
Project Nashorn
Nashorn's goal is to implement a lightweight high-performance JavaScript runtime in Java with a native JVM. This Project intends to enable Java developers embedding of JavaScript in Java applications via JSR-223 and to develop free standing JavaScript applications using the jrunscript command-line tool.
This Project is designed to take full advantage of newer technologies for native JVMs that have been made since the original development of JVM-based JavaScript which was started in 1997 by Netscape and maintained by Mozilla. This Project will be an entirely new code base, focused on these newer technologies. In particular the project will utilize the MethodHandles and InvokeDynamic APIs described in JSR-292.
评论 0
登录后参与评分
还没有评论,来抢沙发吧