MixinRuntime
MixinRuntime 是一款 NeoForge 模组,允许在运行时动态注入 Mixin 配置,绕过标准 Mixin 库要求在游戏启动早期定义配置的限制。
特性
- 运行时 Mixin 注入:利用 Java Instrumentation API 重新转换已驻留在内存中的类,无需重启游戏即可动态注册新的 Mixin 配置。
- 内部类修改:修补核心平台类,包括
MixinProcessor、ModuleClassLoader、ModLauncher和ClassTracker,以启用运行时注入功能。 - 实用工具类:提供全面的工具类用于与 Mixin 内部交互,包括
MixinAgentUtils、MixinTransformerUtils、MixinProcessorUtils和MixinConfigUtils,用于通过反射访问内部 Mixin 结构。 - 模块系统绕过:利用
ModuleUtils打开所有模块进行深度反射访问,从而绕过 Java Platform Module System (JPMS) 限制。
工作原理
该模组通过多阶段引导流程运行:
- Agent 加载:
MixinRuntimePlugin提取内嵌的MixinRuntimeAgent.jar,并使用 Attach API 将其自附加到 JVM,从而获得对java.lang.instrument.Instrumentation的访问权限。 - 环境修补:应用类转换器以修改
ModuleClassLoader、类追踪器和MixinProcessor本身,抑制运行时注入期间的错误。 - Mixin 配置注入:使用
MixinProcessorUtils将新的IMixinConfig实例动态注入到活动 Mixin 处理器的配置列表中。
兼容性
- Minecraft 版本:1.20.1, 1.21 和 1.21.10
- 许可证:MIT
此模组是 VulkanModNeoForge 的核心前置条件,目前仅针对该特定模组测试了兼容性。由于 MixinRuntime 修改了 ModLauncher 和 ModLoader 的内部类,与其他模组的兼容性目前未知,可能会引起冲突。
English
MixinRuntime
MixinRuntime is a NeoForge mod that enables dynamic injection of Mixin configurations at runtime, bypassing the standard Mixin library's requirement that configurations be defined during early game launch.
Features
- Runtime Mixin Injection: Dynamically register new Mixin configurations without requiring a game restart by leveraging the Java Instrumentation API to retransform classes already resident in memory.
- Internal Class Modification: Patches core platform classes including
MixinProcessor,ModuleClassLoader,ModLauncher, andClassTrackerto enable runtime injection capabilities. - Utility Classes: Provides comprehensive utilities for interacting with Mixin internals, including
MixinAgentUtils,MixinTransformerUtils,MixinProcessorUtils, andMixinConfigUtilsfor reflective access to internal Mixin structures. - Module System Bypass: Utilizes
ModuleUtilsto bypass Java Platform Module System (JPMS) restrictions by opening all modules for deep reflection access.
How It Works
The mod operates through a multi-stage bootstrap process:
- Agent Loading: The
MixinRuntimePluginextracts an embeddedMixinRuntimeAgent.jarand self-attaches it to the JVM using the Attach API, granting access tojava.lang.instrument.Instrumentation. - Environment Patching: Applies class transformers to modify
ModuleClassLoader, class trackers, and theMixinProcessoritself to suppress errors during runtime injection. - Mixin Configuration Injection: Uses
MixinProcessorUtilsto dynamically inject newIMixinConfiginstances into the active Mixin processor's configuration lists.
Compatibility
- Minecraft Version: 1.20.1, 1.21 and 1.21.10
- License: MIT
This mod is a core prerequisite for VulkanModNeoForge and has currently only been tested for compatibility with that specific mod. Since MixinRuntime modifies internal classes within ModLauncher and ModLoader, compatibility with other mods is currently unknown and may cause conflicts.
简体中文
MixinRuntime
MixinRuntime 是一款 NeoForge 模组,为 Mixin 提供了在运行时动态直接引用和注入配置的能力,无需重启游戏。该模组附带大量工具类,已在 GitHub 开源。
它绕过了标准 Mixin 库要求在游戏启动早期定义配置的限制,通过 Java Instrumentation API 实现运行时动态注册新的 Mixin 配置,甚至能重转换已加载到内存中的类。
特性
- 运行时 Mixin 注入:利用 Java Instrumentation API,无需重启游戏即可动态注册新的 Mixin 配置,重转换已驻留内存的类。
- 内部类修改:对核心平台类进行补丁,包括
MixinProcessor、ModuleClassLoader、ModLauncher和ClassTracker,以支持运行时注入能力。 - 实用工具类:提供丰富的工具类用于与 Mixin 内部交互,包括
MixinAgentUtils、MixinTransformerUtils、MixinProcessorUtils和MixinConfigUtils,通过反射访问 Mixin 内部结构。 - 模块系统绕过:利用
ModuleUtils打开所有模块进行深度反射访问,从而绕过 Java 平台模块系统 (JPMS) 的限制。
工作原理
模组通过多阶段引导流程运行:
- Agent 加载:
MixinRuntimePlugin提取内嵌的MixinRuntimeAgent.jar,并使用 Attach API 将其自附加到 JVM,从而获得java.lang.instrument.Instrumentation的访问权限。 - 环境修补:应用类转换器修改
ModuleClassLoader、类追踪器以及MixinProcessor自身,抑制运行时注入期间的错误。 - Mixin 配置注入:利用
MixinProcessorUtils将新的IMixinConfig实例动态注入到活跃的 Mixin 处理器的配置列表中。同时支持使用MixinUtils.reapply(mixinClass)来注入原本无法直接注入的类,例如GL11。
兼容性
- Minecraft 版本:1.20.1,1.21 和 1.21.10
- 许可证:MIT
该模组是正在制作的 VulkanModNeoForge 的核心前置模组之一,目前仅测试了与 VulkanModNeoForge 的兼容性。由于 MixinRuntime 修改了 ModLauncher 和 ModLoader 的内部类,与其他模组的兼容性目前未知,可能会引起冲突。
下载 MixinRuntime
下载 MixinRuntime
下载 MixinRuntime
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MixinRuntime
下载 MixinRuntime
下载 MixinRuntime
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
? 使用命令保存和加载玩家或他人的背包/套装。
模组
一个基于构建器的 Minecraft 配置库!
模组
一款轻量级模组,允许服务器管理员对抗透视作弊者。
模组
通过图形界面控制模组加载。适用于需要可选功能的整合包和服务器,也适合不想手动操作文件而希望直接管理模组的极客用户。
模组
一个完整经济模组:玩家余额、动态定价商店、玩家市场、买入订单、货币物品以及网页仪表盘。
模组
? 这是 Serilum 发布的一个自定义模组整合包,请设置你的模组包实例!
评论 0
登录后参与评分
还没有评论,来抢沙发吧