superzanti / ServerSync

Sync files between client and server for Minecraft Forge
GNU General Public License v3.0
155 stars 25 forks source link

[Question] Autorun support via mods folder #306

Open MrKashew opened 12 months ago

MrKashew commented 12 months ago

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?

rheimus commented 11 months ago

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

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.