介绍
中文介绍正在准备中,下面暂时显示原文。
Rhizo
is an updated fork of Rhino, with new features and bugfixes implemented for originally EOL Rhino for 1.16.5.
What’s new
- Remapper support!
- This allows accessing Java methods and fields using their recognizable MCP name instead of SRG name like
func_12345_ab_ - E.g.in KubeJS script, accessing
getOpPermissionLevel()method from MinecraftServer class will require callingfunc_110455_j()instead, but with Rhizo, you can callgetOpPermissionLevel()directly. - ProbeJS Legacy provides special support for remapped name in ProbeJS Legacy 3.2.0, so remapped name can be dumped to provide typing support.
- Note that the original SRG name is intentionally hiddened for exposing remapped MCP name, so you might need to edit your script if you used SRG name(like func_12345_ab_) in your script.
- This allows accessing Java methods and fields using their recognizable MCP name instead of SRG name like
- Extended enum support
- enum name and enum indexes can now replace enum itself in
someMethodCall(enum)andsomeObj.someAttr = enum, allowing you to use enum without having to import it - special equality check for enum, for example
enum == "some_enum_name"orenum == 1(enum index)
- enum name and enum indexes can now replace enum itself in
- Better Java Generics support
- this allows type wrapper to be functional in more cases
- Function Rest Parameter support
- declare function like this:
function a(arg1, arg2, ...restParamHere) {}works now
- declare function like this:
- you can iterate through Java Iterables (List for example) using JavaScript for..of loop
- Optional Chaining operator (a ?. b)
- Nullish Coalescing operator (a ?? b)
- Rhizo now supports
Object.entries(some_obj)andObject.values(some_obj). - Rhizo will retain its param name when compiling, so that you can see more than just type of parameters when working with Rhizo related types, if you have doc dumped by ProbeJS Legacy.
- Fixed JSON generating for Iterable, so that when using
JSON.stringfy()on an array or other iterable objects, all elements can be stringfied (instead of only the first one when using Rhino).
Rhizo is licensed under MPL-2.0.
常见问题
Rhizo 支持哪些 Minecraft 版本?
Rhizo 支持 Minecraft Java 版 1.16.5,可用的加载器:Fabric / Forge。下载时注意选择和你游戏版本一致的文件。
Rhizo 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
ZZZank 的其他作品
查看全部 →FastEvent
by ZZZank
加速 Forge/NeoForge 中的事件系统
564.9万
1 年前
Modrinth · CurseForge
EventJS
by ZZZank
适用于 KubeJS 的分侧可重载原生事件
177.4万
1 年前
Modrinth · CurseForge
EfficientHashing
by ZZZank
为Vec3i和BlockPos提供更好的哈希算法
118.1万
28 天前
Modrinth · CurseForge
JEI Area Fixer
by ZZZank
修复 JEI 界面与模组界面重叠的问题
87.3万
5 个月前
CurseForge
评论
登录后评论和评分