Null Guard Fix for Goety
A small patch (about 3KB) that fixes frequent crashes caused by Goety summons.
Problem
When a Goety summon (such as a Hellfire or a zombie servant) takes damage, the game may crash due to a "timing entity" null pointer exception. This happens most often when multiple summons of the same type are nearby, or when there are ownerless summons. The crash stack always points to Owned.java:186 -> Entity.java:2236.
Root Cause
Goety's Owned.isAlliedTo(Entity) forwards a null entity to vanilla
Entity.isAlliedTo. The damage revenge target AI passes an already-cleared lastHurtByMob()
value when spreading damage to nearby mobs of the same type, and vanilla 1.20.1
dereferences the parameter without a null check (p.getTeam()) -> causing an NPE.
Fix
A null guard was injected at the entry point of Owned.isAlliedTo: it returns false
for a null argument (a null entity can never be an ally). It does not affect game balance
and does not change AI behavior — it is purely a null-safety fix.
Compatibility
- Can be used together with RevelationFix, Goety: Revelation, and all Goety addons.
- Please install it on both the client and the server. For integrated servers, the host must install this mod.
- Contains only one mixin; does not include any Goety code. Licensed under MIT. Please remove the jar file to uninstall.
Thanks to Polarice3 for Goety (https://github.com/Polarice3/Goety-2).
How to Install 诡厄巫法召唤物崩溃补丁 (Mod)
诡厄巫法召唤物崩溃补丁 by 3569863219 is verified for Forge, Neoforge across Minecraft versions 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21.1 (latest release: 1.2.1, file size: 24 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21.1) and platform (Forge, Neoforge).
- Make sure you have the compatible loader or environment installed for Forge, Neoforge.
- Move the downloaded 诡厄巫法召唤物崩溃补丁 file into your Minecraft
.minecraft/modsfolder and launch the game.
All Versions
+ Add Version- Added an entry guard for RevelationFix's
MaverickServant: it inherits the CultistHurtByTargetGoalwith alertSameType enabled, so a null target could reach itsisAlliedToand crash. - Added an entry guard for RevelationFix's
ApostleServant(same code shape; currently unreachable, kept as a defensive alignment). - Added guards for optional add-ons using string targets with no compile-time dependency:
IfritClone(goety_supreme) andMurmurServant/MurmurServantHead(goetyominous). They are skipped with a warning when the add-on is absent. - Patch targets increased from 25 to 28.
- Added a guard for HellBlast explosions: blasts without an owner no longer crash the server. Explosion damage and knockback are unchanged — only the burning effect is skipped when no owner exists.
- Guard count increased from 22 to 23.
- Added
build.ps1: one-command build that reads the version frommods.tomland produces reproducible jars. - Updated mod description and READMEs (EN / ZH).
Note: this version replaces
goetyhellblastfix 0.0.2. Remove that jar if it is installed.### 已更改
- modId 由
goetyfix更改为goetyownedfix,且混入配置文件更名为mixins.goetyownedfix.json——此举可避免与另一款名为“Goety Fix”的内存泄漏模组发生冲突,该模组同样使用了相同的 modId。** - 修复了构建脚本在 JAR 文件中遗留过时的混入配置文件的问题(由于未清理临时目录,导致生成的 JAR 文件同时包含旧版和新版的配置文件)。
- 版本号由2.0.0升级至2.0.1,因为2.0.0版本已以旧的modId发布。
### 已修复
- 在 Goety 3.1.5.1 中,对**全部19个
isAlliedTo(Entity)方法的重写**均添加了基础级空值检查——当传入空参数时,将返回false而非抛出异常,从而解决了此前频繁出现的“Ticking entity”空指针异常问题。 - 为透传调用者添加了原版
Entity.isAlliedTo的安全防护,并在 **MobUtil.illagerAllies** 辅助函数上也增加了相应的保护机制。 - 已在 NeoForge 21.1.219 上、搭配 Goety 3.1.5.1 进行游戏内验证:19/21 个混入规则均成功应用于目标,无冲突、无崩溃。
### 备注
- 替换 2.0.0 版本的 JAR 文件(其 modId 为
goetyfix)——存档不受影响。 - 需要 **NeoForge 21.1.x** 和 **Goety 3.1.5 或更高版本**(适用于 Minecraft 1.21.1 的移植版)。请同时在客户端和服务器端进行安装。
- 软性模式:若未来Goety更新移除了某个目标职业,受影响的混入将被跳过并记录警告日志,游戏仍能正常启动。
### 已更改
- modId changed from
goetyfixtogoetyownedfix**, and the mixin config was renamed tomixins.goetyownedfix.json.
goetyfix,因此此前两者无法同时安装。如今它们已可共存——经游戏内验证:两者的加载均正常,各自的 mixin 配置均已生效,且无任何冲突。- Goety 依赖版本从 2.5.56 降为 2.5.49** — 所有 22 个补丁目标均已针对 Goety 2.5.49.3 / 2.5.55.4 / 2.5.57.0 进行验证。
### 已修复(自 1.1.0 / 1.1.1 起未发生变化)
- 在**全部19个Goety的
isAlliedTo(Entity)重写方法**上添加了基础级空值检查——当传入空值时,将返回false而非抛出异常,从而解决了反复出现的“正在更新的实体”NullPointerException问题。 - 原版
Entity.isAlliedTo安全防护机制**,涵盖传递调用者以及来自其他模组的同类调用。 MobUtil.illagerAllies保护机制**(该辅助工具在未进行空值检查的情况下直接解引用其参数)。- RevelationFix
HereticServant调用方侧防护**(已于 1.1.1 版本中添加;经由一份真实崩溃报告验证的真正导致崩溃的调用方)。
### 备注
- 替换所有旧版 JAR 文件(1.0.0 / 1.1.0 / 1.1.1)——请勿并行安装两个版本。
- 需要 **Forge 1.20.1(47.x)** 和 **Goety 2.5.49 或更高版本**。请同时在客户端和服务器端安装。
- 软性模式:若未来Goety更新移除了某个目标职业,受影响的混入将被跳过并记录警告日志,游戏仍能正常启动。
- 已更新至 Minecraft 1.21.1(NeoForge)
- 注入针对官方的
isAlliedTo名称(NeoForge 1.21.1已不再使用SRG运行时名称) - 在Goety 3.1.5.1中,对所有重写
isAlliedTo的19个类添加了空值保护 - 原版
Entity.isAlliedTo的安全防护机制,覆盖所有间接调用者 - 添加了
MobUtil.illagerAllies保护机制 - 软模式混入配置:当目标类缺失时,会以警告方式跳过,而非导致游戏崩溃
- 需要 NeoForge 21.1.x(或更新的 21.1 版本)以及 Goety 3.1.5 及以上版本(1.21.1 构建版)
- 客户端与服务器均需安装
【本次更新:全面修复Goety的“计时实体”空指针异常崩溃问题】
- 修复范围已从仅限拥有者扩展至全部:19处“是否为盟友”覆盖逻辑——包括此前会导致崩溃的使徒(Apostle.java:399)、宰相、骨王、骷髅王、邪教徒等——一次性解决所有此类崩溃问题
- 新增了原版Entity.isAlliedTo的安全防护机制,同时覆盖了穿越路径以及来自其他模组的同类调用
- 新增了MobUtil.illagerAllies辅助保护函数
- 软性模式下的崩溃防护:若未来Goety更新中移除了某个类或重命名了某个方法,受影响的补丁将被跳过并记录警告日志,游戏仍能正常启动,而不会发生崩溃
- 已验证可与 GoetyAwaken / GoetyLadder / GoetyRevelation / goetygrae 及 RevelationFix 兼容,无冲突
【安装说明】
- 请替换旧版 goetyownedfix-1.0.0.jar — 请勿同时安装两者
- 需要 Forge 1.20.1(47.x)+ Goety 2.5.56+(已在 2.5.57.0 上验证)
- 客户端与服务器均需安装(对于集成服务器,存档所在的主机也必须安装)
- 首次发布:修复诡厄巫法(Goety)召唤物(狱焰、僵尸仆从等)受伤时反复崩溃的 Ticking entity 空指针问题。
- 通过 mixin 在 Owned.isAlliedTo 入口增加空判断,不改动任何游戏平衡或 AI 行为。
- 依赖:Forge 47.x、Minecraft 1.20.1、Goety 2.5.56+。