Touhou Little Maid Garage Kit Fix
Prevents null facing crash when loading garage kits via Kilt or cross-loader environments.
介绍
Touhou Little Maid: Garage Kit Fix (MaidFix)
MaidFix is an ultra-lightweight (6.95 KB), standalone defensive compatibility patch designed to resolve fatal serialization and rendering crashes caused by Touhou Little Maid garage kit blocks in cross-loader translation setups (such as running NeoForge builds via Kilt on Fabric 1.21.1).
The Problem
When running Touhou Little Maid in experimental cross-loader environments (e.g., Fabric with Kilt/Sinytra Connector), certain NeoForge-specific block entity serialization logic fails to populate directional state fields correctly.
Specifically, when placing, breaking, or loading chunks containing a garage kit block, the block entity attempts to read a directional facing property that evaluates to null. This immediately triggers an unhandled NullPointerException (NPE) during chunk rendering or serialization, causing the client or the entire integrated server to crash.
How MaidFix Resolves It
MaidFix acts as a surgical safety net using SpongePowered Mixin:
- Targeted Interception: Injects at the head of the serialization and state-handling methods of the target garage kit block entity.
- Defensive Fallback: If the
facingreference is detected asnull, the patch uses lightweight runtime reflection to silently supply a valid default direction before the game engine attempts to read it. - Silent Non-Invasive Operation: If the object already has a valid orientation (or when running on a native, fully-supported environment), MaidFix performs no modifications and passes execution straight through with zero overhead.
- Zero Failure Side-Effects: Configured with
defaultRequire = 0and isolated try-catch blocks. If upstream classes change or the target is absent, the mixin safely detaches without crashing the game.
Key Features
- Complete Independence: Requires NO external libraries. It does not depend on the Fabric API, secondary utility libraries, or the upstream Touhou Little Maid mod at compile/runtime.
- Minimal Footprint: Total compiled binary size is only 6.95 KB. No assets, no unnecessary background tasks, and zero impact on client frame rates or server tick rates.
- Universal Compatibility: Safe to drop into any Fabric 1.21.1 environment or modpack. If the crash condition is never triggered, the patch remains dormant.
Important Disclaimer
- Crash Fix Only: This mod is strictly an emergency crash-prevention tool. It guarantees that the world, chunk, and client do not crash due to missing direction values.
- Rendering Pipelines: It cannot reconstruct missing model rendering or custom animations if the underlying translation layer (such as Kilt) does not fully support NeoForge’s custom block entity renderers (BER). The garage kit may appear invisible or as a placeholder, but the game will remain fully playable.
Source & License
- License: Public Domain / CC0 1.0 Universal. You are free to redistribute, modify, or bundle this patch in any modpack without permission.
- Source Code: Clean, auditable, and open-source on GitHub.
常见问题
Touhou Little Maid Garage Kit Fix 支持哪些 Minecraft 版本?
Touhou Little Maid Garage Kit Fix 支持 Minecraft Java 版 1.21.1–1.21.11,共 11 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Touhou Little Maid Garage Kit Fix 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅客户端。
评论
登录后评论和评分