mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
354 stars 20 forks source link

Version for testing mod client startup? #202

Open LyFl0w opened 6 months ago

LyFl0w commented 6 months ago

Would it be possible to have a version where just the game launches in the console (without a graphics card or associated screen size)? This would make it easy to automate mod association on client startup from a docker container.

mindstorm38 commented 6 months ago

I don't think that it is currently supported by the client, and this seems really complicated to do just from the command line that starts the game. What do you mean by "easy to automate mod association on client startup"? Just checking that mods properly starts and are compatible?

LyFl0w commented 6 months ago

Yes, I want to be able to simply check that mods start up correctly and are compatible, because as far as I know it's not possible to know if a mod is incompatible with another if it's not tested manually (launch the game, create a new world). I'm going to try running an xorg server on a Linux machine where no one will be on it (but I'm not sure what the result will be).

mindstorm38 commented 6 months ago

This is a technically interesting subject. In the past the launcher used to have an addon that allowed to interact with the game through a Python API, backed by a custom class entry point and remote reflection, this was really cool but I dropped it because it was a bit over engineered and it was not possible to automate. So this is technically possible, but on the other side I don't know at all how we could fake the window system. Something like Selenium but for Minecraft could be insanely useful. Maybe possible by replacing the glfw/opengl libraries with dummy functions? But this requires implementing some part of the APIs anyway.