ServerSync

ServerSync

48.5k Downloads

[Question] Autorun support via mods folder

MrKashew opened this issue ยท 1 comments

commented

I used this mod some years ago for an older server and I remember the process to set it up and run it manually to run the sync. I was wondering if there would be any interest in developing the mod to also run in a way where it can run automatically on launch. Something like e.g. drop the mod in the mods folder (and configs of what server to connect to), have it autorun the sync process on launch for the client, or prelaunch if this is possible, or have it notify client to restart if mods were changed. What are your thoughts on this?

commented

I don't have any plans to attach to runtime MC for several reasons:

  • MC with any amount of mods takes quite a while to start/stop
  • attaching to runtime requires the software to be hard dependent on a mod loading system (fabric, forge etc)
  • load order is not something easily configured in most mod loaders, i.e. I cant easily say SS must start before anything else

It is entirely possible to create a separate mod that provides an in game sync system which just uses SS as a dependency, gets a bit complicated when trying to comply with server host rules though, mostly SS's fault for not being something easily reused.

It is possible already to achieve an automatic pre-launch sync using something like MultiMC which gives you access to pre/post scripts on instances.
e.g. pseudo code

beforeStart:
    java -jar serversync.jar -a cool-server.com -p 1234 --progress --ignore mods/cool-client-only-mod.jar

There is probably also a way to add a fancy profile to the official MC launcher that just runs SS before the game starts, I have not gotten around to looking at the API for it though.