Jacksen's Patches: General
General patches for mods I or others might use in multiple modpacks, and for a few bugs in Minecraft itself that big modpacks run into. None of them contains another mod's code; they only replace or adjust certain methods to make them more efficient or to deal with bugs. No patch runs if the mod it relates to is not installed. Patches that reach into a mod's internals are written for a specific version of it. On newer versions they are checked against the installed mod at startup, and any part that no longer fits switches itself off (with a line in the log), even if it is enabled in the config. On older versions they stay off. Do note some patches will cause minor visual changes in the name of optimization, and you can disable every patch individually (config/jacksenpatches/modules.json).
Mods with fixes:
- Ultimate Enchantments: stops the flood of thousands of "Enchantment registry is not available" errors when another mod scans every item during startup (MineColonies, for example). It could add minutes to server startup.
- Iron's Spells 'n Spellbooks + JEI: removes the exponential extra memory used by Iron's Arcane Anvil imbue recipes, which list every spell at every level for every imbuable item. It's a slow growth, so it only really makes a difference when either every MB matters, or you have a ton of extra spell mods or a ton of items, normally both. In my pack it was about 250-300 MB. Imbuing itself still works, and the scroll, upgrade and attune recipes still show. Also works with EMI through its JEI support, and with Just Enough Everything.
- Entity Culling: it did not cull glowing entities in order to keep visuals from changing at all, but when everything within render distance is glowing because of crazy mods, then it might as well not exist. Now a glowing entity hidden behind terrain only has its outline drawn, which is the only part you could see through the wall anyway. Visible glowing entities are unchanged.
- Just Enough Everything: an optimization was added for getting recipes of map trades, but it only applies to specified map trades. This expands the list to Integrated API's structure maps (used by Integrated Dungeons and Structures and similar). Running those trades for real searched for a structure on every sample while JEE built its trade pages. Real villager trades are untouched.
- Just Enough Everything's World Resources cache: JEE threw its whole cache away on every mod update, because the cache key held every installed mod's version, so loot, mob experience, ores and trades were all rebuilt (over a minute of background work in my pack). Each section now keys only on the mods that can change it, so an unrelated update keeps the cache. Mob experience is also kept per entity type (
config/jacksenpatches/cache/jee_mob_experience.json): JEE's 5-second limit left a different few hundred types out every start, and now the ones it misses are measured on later starts and kept. The first start with this patch rebuilds everything once. - Advanced Worldgen Info (bundled with Just Enough Everything): AWI rebuilt its worldgen pages on the server thread every time a world loaded, holding the world at "generating world 100%" (52 seconds in my pack). The build now runs on its own thread, so the world starts without waiting, and the result is cached in
config/jacksenpatches/cache/awi/until something that affects worldgen changes (the seed, worldgen data or settings, or the mods providing them). Its JEI/EMI pages fill in once it's ready. - Just Enough Everything + C2ME: C2ME's thread checks made some JEI plugins (Apothic Enchanting and MineColonies, for example) fail on JEE's worker threads, and JEE didn't retry them, so their recipes were missing. JEE now sees the failure and runs those plugins again on the client thread.
- Cataclysm Spellbooks: version 1.1.11 is missing its Technomancy upgrade orb type, which broke 980 Arcane Anvil recipes and logged about 2,000 errors. A built-in data pack adds it, in the same form as the mod's other orb types.
Fixes for Minecraft itself:
- Structure search freeze: structure searches running off the main thread (Integrated API's explorer maps, especially when Just Enough Everything samples trades) could corrupt Minecraft's structure cache. The server then froze in an endless loop and hung forever on "Saving world". The cache is now used one search at a time.
- Fireworks that never stop: a firework spawned where the server isn't ticking entities (some mods launch one at a mob while its chunk is still loading) was never removed, so clients kept flying it forever until the game froze and timed out. Such fireworks are no longer added, and leftovers already saved in the world are removed as their chunks load.
- Broken lines on letters: new font textures now start out transparent. UI mods that draw text smoothed could pick up leftover garbage from video memory, which showed as broken lines along the edges of letters.
Diagnostic (off by default): Server Stall Report. When the server goes 2 seconds or more without finishing a tick, it writes what the server thread is doing to the log, and what is holding it up if it is waiting. Useful for tracking down freezes. Read-only and silent while the server keeps up.
Requires Jacksen Core.
Fair warning: AI was used heavily in the making of this. Considering most of the mods I wanted to add patches or integrations with other mods for were entirely AI generated, I do not think that is unreasonable.
Standard Boilerplate: No reposting, no directly modifying the original mod itself. However, if you want to make a separate addon that gives more functionality, overwrites some of what I did, updates the code to later version? Feel free! And anyone is free to use it in their modpack as well. If you find any bugs you want to report, or features you think I should add, or just want me to update it because I haven't checked the mod in a while, feel free to leave a comment!
If any mod maker whose code I made an add-on for wants to yoink that code, send me a message and I'll send you the source! Just let me know what you take for your mod when you decide to use it, or preferably even if you decide to do it better your own way, so I can remove that part from my mods!