Description
MCMT - Multithreading Mod
If you encounter bugs in mods while using this mod, please try to reproduce them without this mod installed as other mod devs shouldn't have to wrap their head around debugging concurrency.
This mod is sponsored by MC Server Hosting
Get our most popular Ryzen 3000 and 5000 powered Minecraft Hosting plan packed with 8GB of RAM for only $15 a month! Find out more at https://mcserverhosting.net/
This is a mod, that multithreads minecraft's tick execution. Crazy, I know. It's brought to you by the dark forces of coremodding, and works only as well as I've tested it
This mod alters the serverside processing (be it on a dedicated server or the single player integrated one) and dispaches all worlds, entities, tile entites and environment ticks to a thread pool, allowing for the parallel execution of minecraft. Under testing this shows about a 20+% improvement in tick times Enabled vs Disabled in single player. Note that uninstalled vs disabled appears to be similar but will have different time charicteristics as this does muck around with lots of the game's execution. In single player I've seen this be closer to 50% on average, and in multiplayer it can possibly be even higher.
Theoretically if this is developed enough (i.e. to the point of stability), it should allow more players in a single instance of a server; or more chunks to be loaded and processed in a modded game.
Note: This mod only mulithreads tick execution; it will probably not help with framerate or anything like that.
I've made a discord, if you want to talk/chat/complain about issues: https://discord.gg/ZuYgPFURkf
Installing
As of 0.18.60 you just download the jar and it self unpacks, no additional effort required
Please also note that if you are having major issues, please try Java 8. There appears to be some odd jvm-version compatibility bug, which I'm looking into. This was fixed in update 0.21.80
Be aware that when uninstalling the mod there will be two jars to delete though
Previous syncfu proccess (0.17.x):
With the latest release, the process for installing has now changed
There are now 2 jars required, one for the actual mod functionality, and another for hooking into modlauncher to allow for the modification of FastUtil. The game will load without the second jar, but will be more unstable. I'm looking into finding a solution for people to not have to download both jars, but that's still work in progress
The two jars are:
- jmt_mcmt-{version}-{mcversion}
- jmt_mcmt-{version}-syncfu
Because curseforge be wierd, I can only attach it to one of the releases (because otherwise it's a duplicate file; why they can't just dedupe IDK)
I'm looking into fixing this but the only reason this is happening at all is because I thought this worked correctly as a single jar solution, and I definately remember testing some configuarion of this, so IDK what happened
Features
- Multithreads ticks of:
- Tile Entities (i.e. blocks
- Entities (Mobs, etc.)
- Worlds/Dimensions (So the overworld and nether can be processed in parallel)
- Environmental ticks (Plant growth, grass spread, etc.)
- Full compatibility (as far as has thus far been tested) with Vanilla minecraft
- Theoretically Compatible with most mods
- This is being tested; but thusfar has worked
Warnings and stuff
If you use this mod with a managed launcher, and wish to remove it; ensure you delete BOTH jars. The mods shops as a Jar in Jar solution to package both the coremod and the forge mod together, but some launchers appear to only remove one of the jars.
This mod is mucking around with minecraft internals in ways they were never indended to be. While it has thus far had >10 hours of testing on it; that's not really that much in the grand scheme of things. Make world backups; expect bugs; etc.
On that note, if you are playing with mods; DO NOT report bugs to the mod author unless they explicitly state they accept them; as mods are not built (currently) to support multithreading. To any mod authors out there, this logs "MCMT enabled; logs invalid" in the logs at a regular interval so as to make it extremely clear that you should ignore these logs.
Also note: Thus far I have encountered 1 occurance of world corruption; but that may to have been caused by another mod in the setup (and was in 1.16.1 so may have been caused by forge beta). Anywho, as of 0.12.22 there is included force-load option that will forciably load damaged chunks. As such, I advise you test setups; please report any bugs to the github (via the issues link) and add a world backup utility.
Broken versions:
Below are versions which I released broken; on the off chance you have one of these, you need to not use it. They have been removed from download though. It's also a good record of mistakes made. They were at the top of the page in angry lettering, but they are now deemed to be no-longer required
Important notice: Please also note that all versions of the 0.13.x build BEFORE 0.13.27 are broken, and were visible for download for a few hours; their broken ness will result in crashes, so should be obviously broken. The breakage was due to me messing up when I was trying to package for release, and I'll rework my build process (as it currently constitues copying files 6 times to create the various builds). I've since fixed the build process mostly (I can now build all necesary version by only changing a couple of files)
WARNING: I get to post another "version be broke" message (which is bad); version 0.17.52 doesn't actually work so is kinda a bit useless, but shouldn't break at least. The easy way to check if the mod is loading properly is if you are seeing "[ne.mi.co.Co.jmt_mcmt/COREMODLOG]: [JMTSUPERTRANS]" in your log. If that's not there, then the mod isn't loading, probs because it's a broken version. Sorry for the inconvenience.
Commands
All commands are subtree'd on "/mcmt"; Autocomplete can find you all the commands but the listings are below should you want to look at them
Config
These allow you to modify the config of MCMT in real time, including totally disabling execution path changes, saving the config, and reverting it
Toggle [option]
This let toggle any of the code path changes. Without any arguments it will issue a global disable
Save | Reload
These either save the running config to the file system, or reload the running config from the file system
TEManage
Subcommands from here let you manage tile entity execution; list will list black/whitelisted TE's; target will let you determine/do stuff with the block you are looking at (like adding it to the white/black list)
Status
This command gives you the current status of the main config (i.e. which execution paths changes are enabled vs disabled)
Stats
Stats will give information about the current MCMT status; it can be toggled using toggle, and can also used for logging stats to disk in a CSV format.
Debug
These are internal debug commands; play with them as you wish; but be aware they may break stuff.
Operating principal
The default minecraft tick loop is basicly just a bunch of for-each loops inside eachother (Basicly here being for simplicity). What this does is say that whenever it would normally do the execution inside the loop, it pushes the task of performing the execution to a thread pool, which will execute handle the work.
In order to do this, it modifies several internal minecraft constructs to make this viable (such as allowing non-main threads to load chunks, etc.).
An additional explanation will be avaliable on github at some point
Spotlight/Demo Videos
KubiRemPL
Known mod incompatibilities
Here I'll put any mods that are incompatible in some way or another
Recomendations config settings for compatibility:
- disableWorldPostTick = true
- enableChunkTimeout = true
- enableBlankReturn = true
Globally incompatible
- Performant - Later versions of this seem to cause breakages that are unhelpful; Compat is being worked on
Errors but ignorable
- Rough Mobs Reloaded - Causes an NPE in the pathfinding code during RiderLocation; is ignorable or this can be disabled in RMR's config
Requires configuration changes
- Clumps - Toggle the option `disableWorldPostTick = true` in the MCMT config
- LycanitesMobs - Disable dungeon generation in it's config (bug cause is unknown) - (TODO verify if this is still needed as of v0.20.x)
Previously broken
- Lava monsters - Was fixed by build 0.11.19
- Serene Seasons - Fixed by 0.11.19
Want to support me? I have a Ko-Fi