Aeronautics Levitite Server Fix
针对 Create: Aeronautics 的微小服务端修复,使 Levitite Blend 能够在专用服务器上结晶。
你需要这个吗?
仅当你使用 专用服务器 运行 Create: Aeronautics 1.2.1 或更早版本 时才需要。
该问题已在 Aeronautics 1.3.0 中从上游修复 —— 如果可以更新到 1.3.0+,请优先更新,这样你就不需要此模组。(1.3.0 需要 Sable 2.0,因此本模组适用于那些锁定在 Aeronautics ≤1.2.1 / Sable 1.x 的整合包。)
问题描述
在专用服务器上,使用催化剂(火把、打火石、火球、营火)右键点击 Levitite Blend 没有任何反应,且服务器日志会抛出:
java.lang.RuntimeException: Attempted to load class
net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER
at net.neoforged.fml.common.asm.RuntimeDistCleaner.processClassWithFlags
at dev.eriksonn.aeronautics.network.packets.LevititeCatalystCrystallizationPacket.handle(:38)
→ Failed to process a synchronized task of the payload: aeronautics:levitite_blend_crystallize
在单人游戏中可以正常工作,因为集成服务器共享客户端分发环境。
原因: 服务端结晶数据包处理器调用了 LevititeCatalyzerHandler.isCatalyzer(...)。该类受客户端污染 —— 其 onUse 引用了仅客户端可用的 LocalPlayer —— 因此在专用服务器上加载它会触发 NeoForge 的 RuntimeDistCleaner,导致数据包处理失败,结晶无法发生。
(此问题作为 Simulated-Project issue #664 在上游被追踪;已通过提交 a86bd1d 修复,并发布在 Aeronautics 1.3.0 中。)
修复方案
单个 Mixin 将该受污染的调用重定向到一个服务端安全的内联物品标签检查 —— 这正是 isCatalyzer 内部计算的内容(item.is(#aeronautics:levitite_catalyzer) || item.is(#aeronautics:levitite_soul_catalyzer))。因此专用服务器永远不会加载受客户端污染的类,而其余部分(已经是分发安全的)处理器则正常执行结晶。
- 无需在编译时依赖 Aeronautics —— Mixin 按名称定位它。
- Mixin 配置是非强制性的:在 Aeronautics 1.3.0+(该方法已被重构移除)上,它只是找不到目标并无害地无操作,而不是崩溃。因此,在 Aeronautics 更新后保留安装也是安全的。
安装
- 仅支持 NeoForge 1.21.1。
- 将 jar 文件放入服务器的
mods/ 文件夹。客户端不需要它(单人游戏已可正常工作),即使存在也无害。
- 需要 Create: Aeronautics 才能生效;单独安装无任何作用。
兼容性
| Aeronautics 版本 |
本模组的效果 |
| ≤ 1.2.1 |
修复服务端的 levitite 结晶问题 |
| ≥ 1.3.0 |
无操作(上游已修复)—— 可安全移除 |
许可证
MIT。不包含 Create: Aeronautics 的代码 —— Mixin 仅通过名称引用它。
致谢
- Create: Aeronautics by Eriksonn / The Creators of Aeronautics.
- 根本原因分析与修复由 DaciteRocks 提供。
Aeronautics Levitite Server Fix
A tiny server-side fix for Create: Aeronautics that lets Levitite Blend crystallize on dedicated servers.
Do you need this?
Only if you run Create: Aeronautics 1.2.1 or older on a dedicated server.
This bug is already fixed upstream in Aeronautics 1.3.0 — if you can update to 1.3.0+, do that instead and you don't need this mod. (1.3.0 requires Sable 2.0, so this exists for packs that are pinned to Aeronautics ≤1.2.1 / Sable 1.x.)
The problem
On a dedicated server, right-clicking Levitite Blend with a catalyzer (torch, flint & steel, fire charge, campfire) does nothing, and the server log throws:
java.lang.RuntimeException: Attempted to load class
net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER
at net.neoforged.fml.common.asm.RuntimeDistCleaner.processClassWithFlags
at dev.eriksonn.aeronautics.network.packets.LevititeCatalystCrystallizationPacket.handle(:38)
→ Failed to process a synchronized task of the payload: aeronautics:levitite_blend_crystallize
It works in singleplayer because the integrated server shares the client distribution.
Why: the server-side crystallization packet handler called LevititeCatalyzerHandler.isCatalyzer(...). That class is client-tainted — its onUse references the client-only LocalPlayer — so loading it on a dedicated server trips NeoForge's RuntimeDistCleaner, the packet fails, and crystallization never happens.
(Tracked upstream as Simulated-Project issue #664; fixed by commit a86bd1d, released in Aeronautics 1.3.0.)
The fix
A single Mixin redirects that one tainted call to a server-safe inline item-tag check — exactly what isCatalyzer computes internally (item.is(#aeronautics:levitite_catalyzer) || item.is(#aeronautics:levitite_soul_catalyzer)). The dedicated server therefore never loads the client-tainted class, and the rest of the handler (which is already dist-safe) crystallizes normally.
- No compile-time dependency on Aeronautics — the Mixin targets it by name.
- The Mixin config is non-required: on Aeronautics 1.3.0+ (where the method was refactored away) it simply finds no target and no-ops harmlessly instead of crashing. So it's safe to leave installed across an Aeronautics update.
Install
- NeoForge 1.21.1 only.
- Put the jar in your server's
mods/ folder. Clients don't need it (singleplayer already works), though it's harmless if present.
- Requires Create: Aeronautics to do anything; does nothing on its own.
Compatibility
| Aeronautics version |
Effect of this mod |
| ≤ 1.2.1 |
Fixes server-side levitite crystallization |
| ≥ 1.3.0 |
No-ops (already fixed upstream) — safe to remove |
License
MIT. Contains no Create: Aeronautics code — the Mixin references it by name only.
Credits
- Create: Aeronautics by Eriksonn / The Creators of Aeronautics.
- Root-cause writeup and fix by DaciteRocks.
评论 0
登录后参与评分
还没有评论,来抢沙发吧