Monkey Patches 是什么?
Monkey Patches 是一个技术实用类模组,旨在通过运行时补丁(runtime patching)的方式修复其他模组中的错误和问题。它专为整合包开发者和高级用户设计,能够在不等待上游版本发布的情况下,快速提供模块化的修复方案。
功能特性
- 基于 Mixin 的精准补丁 Monkey Patches 允许你通过在运行时应用 mixins,向第三方模组注入小型、作用域明确的修复程序。这使得开发者能够在不修改原始模组源代码的情况下,修补依赖项中的 bug、绕过导致崩溃的条件或纠正逻辑错误。
- 非侵入式且可配置 该模组设计为轻量级且非侵入式。所有补丁均在加载时通过 mixin 应用,无需替换 jar 文件或采用核心模组(coremod)技术。每个补丁都可以限定作用于目标模组的特定版本,从而最大限度地减少兼容性问题。
- 专注的补丁模块 Monkey Patches 采用模块化内部结构,允许你按模组或版本清晰地组织补丁。这使得文档编写、隔离和管理你所覆盖的内容变得轻松易行。
- 透明的调试支持 可选的调试日志提供了已应用 mixin 的透明度,并帮助你验证补丁是否正确加载和生效。这在调试整合包启动问题时尤为有用。
对用户体验的影响
对于整合包创作者和技术用户而言,Monkey Patches 减少了因流行模组中存在已知但尚未发布的 bug 修复而导致的停机时间。你不必不得不 fork 代码或等待上游补丁,而是可以以清晰且可追踪的方式应用自己的临时修复方案。
对于玩家来说,这意味着更稳定的整合包、更少的崩溃以及更少的游戏内不一致现象——尤其是在处于活跃开发阶段或使用快照版模组的整合包中。
使用场景
- 修复由另一个模组的特定版本 bug 引起的崩溃。
- 覆盖影响你整合包的不安全假设或边缘情况行为。
- 确保原本未设计为协同工作的模组之间的兼容性。
- 在提交拉取请求(Pull Request)或等待新版本发布之前,临时修补问题。
包含的修复内容
这些修复针对的是已在官方仓库中修复但尚未在稳定版或公开构建版中可用,或者尚未在官方层面修复的 bug。Monkey Patches 为你提供了一种在当前整合包中干净地应用这些修复的方法。
Copper Age Backport 补丁
- 修复铜盔甲拥有无限耐久度的问题(0.1.4 及更早版本)(问题链接)
Create Stuff 'N Additions 补丁
- 使 gadgets(小工具)和 tanks(储罐)可以在 Create 的注液口及其他支持标准 Neoforge 流体处理的容器中填充(问题链接)
Farmer's Delight 补丁
- 修复 Farmer's Delight 1.3.1 中因废弃的
ModTags引用为null而偶尔引发的NullPointerException崩溃,在使用 Fungi Delight 等插件时可见(问题链接)
Just Enough Resources 补丁
- 修复在使用添加自定义生物群系的模组(如 Vanilla Backport)时,JER 标签页(如村民交易)缺失、崩溃以及空生物群系列表的问题(问题链接)
KubeJS 补丁
- 修复 KubeJS 中关于混凝土构建器类型的假设,当注册表中存在 CustomBuilderObject 实例时可能导致 ClassCastException。(问题链接)
Patchouli 补丁
- 修复当带有自定义书籍物品的书在其模组注册其物品之前加载时发生的注册表访问错误,例如与 Ars Nouveau 配合使用时(问题链接)
Physics Mod 补丁
- 修复藤蔓物理效果卸载时的崩溃,例如在安装 Sodium 的情况下启用资源包时(Physics Mod 3.0.32)(问题链接)
Portable Tanks 补丁
- 修复 JEI 中缺失的 Create 配方(问题链接)
Rhino 补丁
- 修复 Rhino 类文件写入器中无法解析数组内的对象签名(如
[Ljava/lang/String;)的问题(拉取请求链接)
Satisfying Buttons 补丁
- 修复在搭配 FancyMenu 3.9.x 使用时 Satisfying Buttons 导致的启动崩溃(问题链接)
Subtle Effects 补丁
- 修复在使用 End Remastered 时 Subtle Effects 发生的崩溃(问题链接)
What is Monkey Patches?
Monkey Patches is a technical utility mod designed to patch bugs and issues in other mods through the use of runtime patching. It is built for modpack developers and advanced users who need quick, modular fixes without waiting for upstream changes to be released.
Features
- Targeted Mixin-Based Patching Monkey Patches allows you to inject small, scoped fixes into third-party mods by applying mixins at runtime. This enables developers to patch bugs, bypass crash conditions, or correct logic errors in dependencies without modifying the original mod’s source.
- Non-Invasive and Configurable The mod is designed to be lightweight and non-intrusive. All patches are applied via mixin at load time, without replacing jar files or using coremod techniques. Each patch can be scoped to specific versions of the target mod, minimizing compatibility issues.
- Focused Patch Modules Monkey Patches uses a modular internal structure, allowing you to clearly organize patches by mod or version. This makes it easy to document, isolate, and manage what you’re overriding.
- Transparent Debugging Support Optional debug logging provides transparency for applied mixins and helps you verify that patches are correctly loaded and active. This is especially useful when debugging modpack launch issues.
How This Affects the User Experience
For modpack creators and technical users, Monkey Patches reduces downtime caused by known but unreleased bug fixes in popular mods. Instead of having to fork or wait for upstream patches, you can apply your own temporary fixes in a clean and trackable way.
For players, this results in more stable modpacks, fewer crashes, and fewer gameplay inconsistencies—especially in packs under active development or using snapshot mod versions.
Use Case Scenarios
- Fixing a crash caused by a version-specific bug in another mod.
- Overriding unsafe assumptions or edge case behavior that affect your modpack.
- Ensuring compatibility between mods that were not originally designed to work together.
- Temporarily patching issues before submitting a pull request or waiting on a new release.
Included Fixes
These fixes address bugs that are fixed in upstream repositories but not yet available in stable or public builds, or that haven't been fixed upstream yet. Monkey Patches provides a clean way to apply them in your modpack today.
Copper Age Backport Patches
- Fix copper armor having infinite durability (versions 0.1.4 and older) (Link to Issue)
Create Stuff 'N Additions Patches
- Make gadgets and tanks fillable in Create spouts and anything else supporting standard Neoforge fluid handling (Link to Issue)
Farmer's Delight Patches
- Fix an occasional
NullPointerExceptioncrash caused by deprecatedModTagsreferences beingnullin Farmer's Delight 1.3.1, seen with addons such as Fungi Delight (Link to Issue)
Just Enough Resources Patches
- Fix missing JER tabs (such as villager trades), crashes, and empty biome lists when using mods that add custom biomes, such as Vanilla Backport (Link to Issue)
KubeJS Patches
- Fix assumptions about concrete builder types in KubeJS that could cause ClassCastException when CustomBuilderObject instances are present in registries. (Link to Issue)
Patchouli Patches
- Fix registry access errors when books with custom book items load before their mod has registered its items, such as with Ars Nouveau (Link to Issue)
Physics Mod Patches
- Fix a crash when vine physics are unloaded, such as when enabling a resource pack with Sodium installed (Physics Mod 3.0.32) (Link to Issue)
Portable Tanks Patches
- Fix missing Create recipes in JEI (Link to Issue)
Rhino Patches
- Fix object signatures inside arrays (such as
[Ljava/lang/String;) failing to parse in Rhino's class file writer (Link to Pull Request)
Satisfying Buttons Patches
- Fix a startup crash when Satisfying Buttons is used with FancyMenu 3.9.x (Link to Issue)
Subtle Effects Patches
- Fix crashes in Subtle Effects when also using End Remastered (Link to Issue)
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Monkey Patches
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
新增
- Physics Mod 藤蔓卸载修复
- DoublyLinkedListMixin:跳过未链接到列表中的节点的
removeNode,并在clear()中分离所有节点 - 解决了在 Sodium 删除带有藤蔓物理效果的区块部分(例如资源包重载结束时)时,
net.diebuddies.util.DoublyLinkedList.removeNode中出现的NullPointerException: Cannot assign field "next" because "node.prev" is null以及随后的IllegalStateException: Worker threads are not running崩溃问题 - 未向官方上游报告(Physics Mod Pro 为闭源软件)
- 仅适用于 Physics Mod
3.0.32(Pro v185) - 配置选项:
patches.physicsmod.vine_unload_fix_enabled(默认值:true)
- DoublyLinkedListMixin:跳过未链接到列表中的节点的
技术细节
PhysicsWorld.destroy()调用DoublyLinkedList.clear(),这会丢弃head/tail,但使节点保持链接并存储在其所属元素上;稍后移除旧的第一个元素时会进入中间节点分支,导致prev为null- 编译时不可用 Physics Mod:将
Node参数作为@Coerce Object处理,并通过在目标类内部创建的MethodHandles.Lookup访问LinkedListGuard的私有字段
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧