PatchLib – Bug Fixes, Crash Fixes & Mod Compat
A configurable collection of bug fixes, crash fixes and compatibility patches for mods like Tom's Simple Storage, Create, Vampirism, Toxony, Prickle and Arclight. Every patch auto-skips when the mod isn't installed. Stabilize your modpack or server.
介绍
PatchLib is a random assortment of bug fixes, crash fixes and compatibility patches for various mods — Farmer’s Delight, Tom’s Simple Storage, Vampirism, Toxony, Create, Sable, KubeJS, Arclight and more.
I originally built it just to stop the servers I run from crashing. Over time it grew into a proper little library of fixes, and at some point it stopped making sense to keep it to myself — if one of these crashes has cost you a server restart at 2 AM, this is for you.
Patches only run when they are actually needed
This is the part that matters if you maintain a modpack. PatchLib never touches a mod you do not have installed. Before a single patch is applied, it checks:
- Is the target mod installed? If not, the patch is skipped — no errors, no log spam.
- Is the mod version actually affected? Several fixes are bound to the exact versions that carry the bug. Update the mod past it and the patch quietly steps aside instead of fighting the official fix.
- Does another mod already patch this? Known conflicts disable the patch automatically.
- Is this the right side? Client-only fixes are never loaded on a dedicated server, and the Arclight fixes never on a client.
- Is it a diagnostic or an experiment? Those are opt-in and stay off until you switch them on.
Every decision is printed on startup, so you always know what is running:
[PatchLib] --- Patch Status Report (dedicated server) ---
[PatchLib] compat.create_contraption_collider [...] -> ACTIVE
[PatchLib] farmersdelight.tag_load_order [...] -> SKIPPED (target not present)
[PatchLib] debug.connection_probe [...] -> DISABLED (by config)
[PatchLib] patchouli.book_registry_lookup [...] -> SKIPPED (not loaded on this side)
[PatchLib] --- 5 of 29 patches active ---
Drop it into a pack with none of the target mods and all it does is print that report.
Included fixes
Crash fixes
| Mod | What it fixes |
|---|---|
| Sable / Create Aeronautics | Rapier native panic: No center of mass for body! — a physics sub-level without solid blocks reached the physics engine with no mass data, and the next physics tick took the server down. PatchLib fixes the cause by giving such a sub-level its plot origin as centre of mass. |
| Sable (safety net) | When a physics panic still arrives as a Java exception, Sable turns it into a server crash. PatchLib catches it instead, repairs the state Sable leaves behind on that path and runs Sable’s own sub-level recovery. Panics that abort natively cannot be caught from Java at all — that is why the fix above goes after the cause. |
Sable 2.0.5 |
Sub-level assembly attempted inside plot of already removed sub-level — when a ship lost its last solid blocks while it was still being split into pieces (typical in cannon fights), Sable kept running the split on the already deleted ship and crashed the server. A deleted sub-level no longer splits. Sable had already decided to delete it, so no blocks are lost or duplicated. |
Create: Mobile Packages 0.7.6 + Create redstone links |
Server hang (“Watching Server”, a tick that never ends) when chunks unload, seen with C2ME. A Bee Port whose chunk unloaded loaded the chunks of other ports while that unload was still running, and the server waited forever. Create’s redstone links could do the same when they checked the other links of their frequency. Both now only look at chunks that are already loaded and give the same answer as before. |
| Corpse | IndexOutOfBoundsException in ItemListInventory.getItem when two players use the same corpse: one has the additional-items page open while the other presses transfer. Slots past the end of the list now read as empty, so nothing can be taken twice. |
| Wetland Whimsy | IllegalStateException: Adding duplicate value — its decorated pot patterns were registered twice, which aborted RegisterEvent and rolled every registry back to vanilla. |
| Tom’s Simple Storage | IllegalStateException: Do not call getCapability on an invalid cache crashing the tick loop from InventoryConnectorBlockEntity. A retired capability cache is now treated as an empty inventory. |
| Toxony | Thrown Oil Pot crashing with a null itemStack after a chunk reload or restart — the stack is now saved to NBT, and onHit is guarded. |
| Prickle / PigPen | Unreadable config aborting the whole datapack load, leaving the server hung at startup. Falls back to defaults, keeps a copy of the broken file, and lets the config heal itself. |
| Prickle | Config format flipping between runs because the property adapters are resolved through the thread context classloader. Now resolved deterministically. |
| Portable Tanks | NullPointerException when a tank item has no fluid NBT. |
| KubeJS | ClassCastException during capability registration and server script loading when a pack registers builders of mixed types. |
| Vampirism | NullPointerException in ActionHandler.deactivateAllActions on hybrid servers. |
Arclight / hybrid server fixes
ClassCastExceptionwhen modded entities run Villager AI tasksNullPointerExceptioninBrain.tickfrom Arclight’s villager career redirectClassCastExceptionmapping Friends & Foes entities to Bukkit wrappers- Bucket events:
NullPointerException: ... because "position" is nullwhen a mod empties a bucket for a player without a right-click — for example a Supplementaries slingshot shot carrying a water or lava bucket. It crashed the whole server while the projectile ticked. Arclight only records the clicked block during a real right-click; when that is missing or stale, PatchLib now uses the block that actually changes. - VanillaBackport: startup crash — its
ThrownEggMixinfinds nothing to inject into in Arclight’s rewrittenThrownEgg.onHit. PatchLib takes that one mixin off and sets the hatched chicken’s variant itself. - Blueprint: crash on the first structure load — its
StructureStartinjector no longer matches Arclight’s rewrittenplaceInChunk. PatchLib disarms only that injector and feeds Blueprint’s repaletters from a spot that still exists. - Supplementaries cannons:
World minecraft:server_projectile_test_level does not have a CraftWorld— the server crashed as soon as a cannon was loaded, fired or aimed by a Plunderer. Supplementaries test-fires each shot in a private test level; Arclight gives such levels no Bukkit world on purpose, but its entity NBT and game event hooks asked for one anyway. Levels without a Bukkit world now get no Bukkit NBT and no game events (nothing in them listens), and real worlds get their Bukkit data and events exactly as before.
These only load when Bukkit classes are present, so they are inert on plain NeoForge. The VanillaBackport, Blueprint and Supplementaries cannon fixes remove exactly one mixin or injector (for the cannons: one of Arclight’s own) and take over its job; they say so in the log when they do.
Compatibility & behaviour fixes
| Mod | What it fixes |
|---|---|
| Create | NullPointerException in ContraptionCollider when a movement axis is null |
| YUNG’s Better End Island | Ender Dragon being spawned twice |
| Farmer’s Delight | Tag keys left null by mod load order |
| Copper Age Backport | Copper armour registered without durability |
| Subtle Effects | End Remastered portal frame ticker never firing |
| Just Enough Resources (client) | Modded biomes missing from JER tabs |
| Patchouli (client) | Modded book cover items failing to resolve |
Performance patches
Hot spots found with spark on a Create + Aeronautics (Sable) server with ~350 mods and on a Vampirism server with ~240 mods. Each shortcut returns the same result as the code it replaces. Each patch is pinned to the mod versions it was checked against and skips itself on any other version.
| Mod | What PatchLib changes |
|---|---|
Create: Fluid 2.1.6 |
The per-entity, per-tick fluid check is skipped when no chunk section the entity touches can hold slime, haunting or smoking fluid. The check looks at the section’s block palette. It was about 5 % of the server thread. |
Simulated Coasters 0.1.5 |
The cart and rivet search skips sections whose palette cannot contain the searched block, instead of reading every block of every sub-level on every physics substep. |
| Sable Guidance | The guided-shell search runs once per tick instead of once per physics substep. Steering is unchanged. |
| Create encased fans | The recipe answer for items in an air current is cached for up to 20 ticks instead of being looked up per item and tick. The cache is dropped on /reload. |
Sable 2.0.5 |
An allocation-free version of Sable’s entity ticking-range check. Entity tracking skips the sub-level lookup outside the plot grid. |
Steam ‘n’ Rails 0.2.1 |
The DataFixer pass over loaded entity chunks is skipped when the data holds no railways: id. It took about 15 ms per entity chunk. |
GnKinetics 1.0m |
Its hooks on getBlock() and getItem() keep their logic but no longer allocate an object on every call. |
Automated Logistics 0.6.0 |
Logistics terminals are indexed instead of walking every block entity around each player every 10 ticks. |
Vampirism 1.10.x |
Village totems searched 5000 blocks around them for a vampire forest (2 to 7 minutes of CPU each) on the pool that also loads chunks, and again every time their chunk loaded. Multi-minute server freezes during teleports ended exactly when such a search finished. The search now runs on its own thread, and its answer is kept per totem and saved with the world. |
Vampirism 1.10.8–1.10.13 |
The per-second village scan of each totem reads every chunk column once instead of once per point of interest. Same result, checkable live with verify. |
Dragon Mounts Remastered 1.9.2 |
On every player join DMR rebuilt all its data and resent the whole advancement tree to every online player — over 0.5 s of server thread per join with 10 players online. Its data is now built once at server start and after /reload; joins only get DMR’s sync packet. |
/patchlib perf shows each patch’s state and how often its shortcut was taken. /patchlib perf <patch> on|off switches one at runtime: off runs the original code, so spark can compare both in one session.
Opt-in tools (off by default)
These do not target any particular mod, so they would run in every pack — which is exactly why they stay off until you set them to true in the config:
| Key | Side | What it does |
|---|---|---|
advancements.hashed_progress_decode |
server | Loads player advancement files in linear instead of quadratic time. That matters on big modpacks: a 9 457-entry file now loads in 30 ms instead of 1.5 s, on every login and for every Create deployer owner. Same result and same error handling. Opt-in only because it targets Minecraft itself. |
debug.connection_probe |
server | Logs every player’s connection state once a second (open, writable, bytes waiting, queued packets). For hunting down “player freezes, then times out”. Very noisy — switch it off again afterwards. |
sleep.entity_resync |
server | While someone sleeps, re-sends the position of mobs near players so clients stop drawing them somewhere they are not. A workaround, not a fix. |
client.desync_snap |
client | Snaps an entity to its server position when the client has drifted more than 2 blocks away, instead of easing towards it. A symptom brake. |
client.sleep_desync_probe |
client | Measures how long incoming packets wait on the client and how far entities have drifted, then prints a verdict. Diagnostic only. |
Operators also get /patchlib testpanic [ticks]: it makes the next physics ticks fail on purpose, so you can prove the Sable safety net works before a real crash does. Heads-up: the first failed tick already starts Sable’s sub-level recovery, which anything flying will notice.
Version-bound patches
A few fixes only apply to the mod versions that actually carry the bug. If your version is newer, PatchLib reports the patch as skipped — that is intended, not a failure:
| Patch | Applies to |
|---|---|
| Farmer’s Delight — tag load order | 1.3.1 only |
| KubeJS — builder casts | below 2101.7.2 (and disabled when KubeJS Tweaks is present) |
| Copper Age Backport — armour durability | 0.1.4 and older |
| Subtle Effects — End Remastered ticker | 1.11.0 only |
| Wetland Whimsy — pot patterns registered twice | below 2.0.4 |
| Sable — split of a deleted sub-level | 2.0.5 only |
| Create: Mobile Packages — Bee Port chunk-unload hang | 0.7.6 only |
| Create — redstone link chunk-unload hang | 6.0.8 to 6.0.10 |
| Performance patches (Create: Fluid, Simulated Coasters, Sable, Steam ‘n’ Rails, GnKinetics, Automated Logistics, Sable Guidance, Vampirism, Dragon Mounts Remastered) | the exact versions listed under Performance patches |
Everything else applies to any version of its target mod.
Configuration
Every patch has its own toggle in config/patchlib-patches.properties. The file is generated on first launch with one commented entry per patch:
# --- toms_storage ---
# Treats a retired NeoForge BlockCapabilityCache as an empty inventory instead of throwing
# IllegalStateException out of InventoryConnectorBlockEntity ticking
toms_storage.stale_capability_cache=true
# --- debug ---
# Logs every player's connection state once a second (...). Very noisy
# Opt-in: off unless set to true here.
debug.connection_probe=false
If a fix ever conflicts with something, turn off that one line — no need to remove the mod. When you update PatchLib, new patches are added to your existing file and every value you already set is kept.
Sides
PatchLib is a server-side mod, optional on the client. It registers no network packets and no registry entries, so players without it can join your server normally. Installing it on the client as well adds the two client-side fixes on top, plus the two opt-in client tools if you want them.
Requirements
- Minecraft 1.21.1
- NeoForge 21.1+
- No dependencies
Credits
The Farmer’s Delight, Portable Tanks, Copper Age Backport, Subtle Effects, KubeJS and Just Enough Resources fixes are ported from Monkey Patches by iamthemcmaster (LGPL). Thank you!
⚠ Please read before reporting
These patch bugs in other people’s mods. As those mods update, some of these issues will be fixed properly at the source. Where I know the affected version range, PatchLib disables the patch automatically once you update past it — but I cannot predict every future release. If a mod fixes something natively and the patch gets in the way, just set it to false in the config.
Bug reports about the patches themselves are very welcome. Bug reports about the patched mods belong to their authors.
常见问题
PatchLib – Bug Fixes, Crash Fixes & Mod Compat 支持哪些 Minecraft 版本?
PatchLib – Bug Fixes, Crash Fixes & Mod Compat 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。
PatchLib – Bug Fixes, Crash Fixes & Mod Compat 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
epicskydex 的其他作品
查看全部 →Essential Tweaks (Essential Adblocker)
为 Essential 设置整洁的默认选项:按键绑定均未绑定、不启用 Discord RPC,并隐藏游戏内通知。
LagShield Ultimate (Anti Lag)
The intelligent performance modulator for Minecraft Server. LagShield Ultimate uses Arclight-safe async processing to dynamically regulate mob AI, chunk density, and entity speed based on real-time server stress (MSPT). Stops lag before it happens.
X-SHIELD (anti-cheat)
Modpack anti-cheat (requires client & server). Detects X-Ray packs, hack clients & cheat mods using deep structure analysis, hashes & API lookups. Includes an interactive Discord bot, server-side ore tracker, auto-bans & live alerts.
Snow Real Magic × Serene Seasons
Fixes the missing compatibility between Snow! Real Magic! and Serene Seasons — snow, ice and snowy plants now properly melt in spring & summer, and return each winter. Server-side only.
评论
登录后评论和评分