Custom Minecraft Launcher

Discussion in 'Programming' started by Vert3xo_, Mar 4, 2020.

  1. Hello, I wanted to create custom Minecraft launcher as a fun free time project but I don't really know where to get started. I read about Mojang API and Game Files. I also found this thread here on Spigot but I have some more questions.

    My first question is about arguments which can be seen here at the bottom of the page. I have no clue what userProperties and userType is. Others are quite self explanatory. Maybe except gameDir argument which I'm not sure if it is .minecraft folder or something else.

    My other question is if I should be trying to launch file in .minecraft/versions/<version>/<version>.jar. If so I'm getting this error:
    Code (Text):
    Error: Could not find or load main class net.minecraft.client.Main
    Also how would I go about launching mods with Forge?
    This thread is not about programming the GUI for the launcher. I actually find it easier than other things :)
     
    #1 Vert3xo_, Mar 4, 2020
    Last edited: Mar 4, 2020
  2. Hello, You should put userProperties to {} and userType to legacy and gameDir to the path of .minecraft or a folder you like.
    the main class is at net.minecraft.client.main.Main, not net.minecraft.client.Main :)
    To use forge, i think that you should read the forge's manifest's launch argument, gather the libraries, use the manifest's argument and launch it with the main class that you found the the manifest (it may be different?).
     
  3. Thank you for your answer. In the mean time I found this GitHub repository and I've been playing with it and editing the code for some time now and I finally figured it out :)
     
    • Like Like x 1
  4. Hey I'm wondering if this plugin only works properly on a 7 years outdated version while it can only perform shitty in the newest version of Minecraft? I hope so, because I also don't value new features to a game as something important and I think developers should aim their plugins at a version that only 15% of servers run because a certain popular minegame server does it.
     
    • Like Like x 1