本模组适用于 1.12.2-。如果您在寻找适用于 1.16.5+ 的版本,请前往 Redirectionor
前言
在 Minecraft 知名的优化模组中,如 Sodium、Lithium 或 Phosphor,存在一个常见的优化理念:将枚举类中对元素值的引用替换为对 static final 字段值的引用。
该技术的目的是通过提高访问速度并减少在频繁访问常量时的不必要计算来提升性能。
简介
Redirectionor 是该理念的实现,旨在降低游戏的内存占用。
Redirectionor 具体优化了什么?
范围相当广泛。此模组重定向了几乎每一次 Enum#values() 调用……
虽然该实现并非“彻底”,但仍然相当令人印象深刻。
兼容性
Redirectionor 设计为与所有模组兼容。 代码位于 1.12.2-1.8.8 或 1.7.10
如果遇到任何兼容性问题,请在我的 Issues 页面上创建新问题,或者调整 redirectionor_cfg.json
注意
Redirectionor 同时在客户端和服务端运行,可以安装在服务器上,无需客户端也安装该模组。
This mod is for 1.12.2-, If you are looking for 1.16.5+ go Redirectionor
Preface
In the well-known optimization mods for Minecraft, Sodium, Lithium or Phosphor, there is a common optimization concept: replacing references to element values in enum classes with static final field values references.
This technique aims to enhance performance by improving access speed and reducing unnecessary computations when frequently accessing the constants.
Introduction
Redirectionor is the implementation of this concept to reduce the required memory of the game.
What does Redirectionor optimize exactly?
It's quite wide. Nearly every Enum#values() call is redirected in this mod......
This implementation is not "thorough", but it is still quite impressive.
Compatibility
Redirectionor is designed as compatible with every mod. Codes at 1.12.2-1.8.8 or 1.7.10
If you encounter any compatibility problem, pls create a new Issue on my issues , or adjust the redirectionor_cfg.json
Note
Redirectionor works on both the client and server and can be installed on servers without requiring clients to also have the mod.
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Redirectionor [Retro]
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
添加一个新的调试模式。你可以在 redirectionor_cfg.json 中将 "checkEnumsWhenRunningTime"(设为 true)以启用它。
当此模式启用时,Redirectionor 会检查你的枚举类型。当 $VALUE$ 被修改时,Redirectionor 会在日志中打印一个 IllegalStateException,你可以在其中看到相关的枚举和调用者。
```
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: java.lang.IllegalStateException : net/minecraft/client/shader/ShaderLoader#values() has been broken.
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at net.minecraft.client.shader.ShaderLoader$ShaderType.redirectionor_logError(ShaderLoader.java)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at net.minecraft.client.shader.ShaderLoader$ShaderType.redirectionor_checkEnums(ShaderLoader.java)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at net.minecraft.client.shader.ShaderLoader$ShaderType.values(ShaderLoader.java:97)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at com.Hileb.teampotato.redirectionor.demo.EnumTestDemo.enumFacing(EnumTestDemo.java:19)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at com.Hileb.teampotato.redirectionor.demo.EnumTestDemo.onLaunch(EnumTestDemo.java:13)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[15:25:57] [main/INFO] [STDERR]: [com.Hileb.teampotato.redirectionor.Redirectionor:logError:30]: at java.lang.reflect.Method.invoke(Method.java:498)
```
在这种情况下,我们可以将 net.minecraft.client.shader.ShaderLoader 添加到配置中以阻止它,或者移除模组 com.Hileb.teampotato.redirectionor.demo.EnumTestDemo。
**完整更新日志**:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
一个基于构建器的 Minecraft 配置库!
评论 0
登录后参与评分
还没有评论,来抢沙发吧