Jump to content

Adding additional data to server status response JSON


pauk960

Recommended Posts

I want to create autoinstall, autoupdate script for my custom modpack (not on ftb). So, I was thinking of creating a small server mod that would add modpack version and modpack download URL fields to JSON status response. Script would then compare version, and download and install the modpack from provided URL.

Link to comment
Share on other sites

Fun fact:

I was thinking of creating a small server mod

 

Sending additional data (tho possible) will still require you to actually have client-reader.

Also - as mentioned - in-game updating is ridiculus. You would still have to restart the game.

 

What you can do:

* Make your own launcher or update-program (like forge installer).

* Download updates on startup (preInit of mod) and then force game-restart (I doubt forge will even allow you to realod classes in runtime, I've tried it and it's too messy).

* If update of modpack is server-dictated (server decides what client loads) you will still have to code some dynamic loading.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

We use MultiMC, which has an option to define a pre-launch command that will be executed before launching Minecraft. So no, I wouldn't do updating from Minecraft client, but from script that runs before Minecraft. I've already created a script that send handshake to server and prints out response JSON in console.

 

If it's not possible to append data to response JSON, then my other solution would be to create a custom packet handler, and a script that mimics a Minecraft client.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.