Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • How was Forge created, as well as others?
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
jonathanpecany

How was Forge created, as well as others?

By jonathanpecany, November 26, 2020 in General Discussion

  • Reply to this topic
  • Start new topic

Recommended Posts

jonathanpecany    0

jonathanpecany

jonathanpecany    0

  • Tree Puncher
  • jonathanpecany
  • Members
  • 0
  • 17 posts
Posted November 26, 2020 (edited)

So, I have a question that is really bugging me a lot, but how was things such as Forge, Bukkit, Spigot, Optifine, etc created. Like what kind of resources did they use, did they use a Minecraft API or something, how did they manage to make it so the Minecraft launcher can detect it and run it. I kind of wanted to create my own someday but I don't know where to start, and I know I could ask when I wanna start but this question just really bugs me.

=== Skip this passage if you don't wanna know why I asked on Forge forums ===
I know I could also ask on other forum websites, like Minecraft Forums and Bukkit forums but Minecraft Forums is pretty much dead and/or dead to me and people on Bukkit don't get to the point well enough, but I asked here since Forge is a part of my question, it is quite active, and people manage to get to the point when answer, as well as nice...well, kind of nice...okay, some people on here are a bit rude, but at least they get to the point. So that is why I am asking here. I just typed this part so you guys don't ask about other forums, just in case since I am talking about other things as well. And if you are about to recommend another forum, don't, any other ones, I won't truly know about and would rather not use any recommendation, too much work to ask a simple (Maybe complex) question.
===================================================================

Any intel, documentation, etc, please share. I do know quite a bit of Java, so I will understand documentations and such. So just any intel you got, it will also be very nice if a Forge developer answered as well, like very nice as I know they will have an answer. I won't accept an indirect answer however, so I need some sort of sources, documentation, or/and examples. Hopefully this all

Edited November 26, 2020 by jonathanpecany
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7697

diesieben07

diesieben07    7697

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7697
  • 56430 posts
Posted November 26, 2020

Forge uses a large set of tools, all the necessary ones are open source as far as I know: https://github.com/MinecraftForge/

 

There is no "MinecraftAPI", Minecraft is closed source and obfuscated. The rough process for development is this:

  1. Download Minecraft.
  2. Run it through a decompiler.
  3. Fix any decompilation issues.
  4. Rename the obfuscated names to something readable.

Forge then uses a patching system to change the necessary part of the Minecraft code. During development these work on the source code level (changes in .java files), but at runtime they will be applied as binary patches to the .class files. To do this, Forge uses a custom class loader, which can transform any class as it is being loaded.

 

As for how the launcher knows how to launch forge: The Minecraft launcher is configured through .json files in the versions folder. The Forge installer creates one.

  • Quote

Share this post


Link to post
Share on other sites

jonathanpecany    0

jonathanpecany

jonathanpecany    0

  • Tree Puncher
  • jonathanpecany
  • Members
  • 0
  • 17 posts
Posted November 26, 2020
10 hours ago, diesieben07 said:

Forge uses a large set of tools, all the necessary ones are open source as far as I know: https://github.com/MinecraftForge/

 

There is no "MinecraftAPI", Minecraft is closed source and obfuscated. The rough process for development is this:

  1. Download Minecraft.
  2. Run it through a decompiler.
  3. Fix any decompilation issues.
  4. Rename the obfuscated names to something readable.

Forge then uses a patching system to change the necessary part of the Minecraft code. During development these work on the source code level (changes in .java files), but at runtime they will be applied as binary patches to the .class files. To do this, Forge uses a custom class loader, which can transform any class as it is being loaded.

 

As for how the launcher knows how to launch forge: The Minecraft launcher is configured through .json files in the versions folder. The Forge installer creates one.

Thanks, and I can see the long process, how long did it take to create it.

  • Quote

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • chaskuchar
      is there any release i can play past 1.16.4

      By chaskuchar · Posted 3 minutes ago

      i was trying to play 21w0b8 and started it without the controller i use with forge helping me for the controller.  i can start using the lancher a new game like 21w0b8 and the save it after i start.  then i quit and restart the launcher and start forge.  i choose the new game which has 21w0b8 at the link and get a message that it might not be compatible but it starts and the controller is working ok.  now my question is, i think the game only loads for 1.16.4.  i can't find the copper or anything special for the new snapshot.  am i chasing a dead horse trying to play with a controller on a new release???  thanks.  chas
    • Herobrine510
      modded server problems

      By Herobrine510 · Posted 7 minutes ago

      so i just made a modded minecraft server yesterday but i've been getting multiple issues with it like yesterday it was java.lang.nullpointerexception and java.noclassdefounderror. i linked that crash report. and i wanted to link my mods folder but that didnt work so yeah. and now today it's been saying that it can't bind to the port and then it's like "Is there another server running?" when there isnt. i linked that crash report too and i would really appreciate some help.crash-2021-03-03_19.28.04-server.txt crash-2021-03-04_12.22.51-server.txt Oh it says "the state engine was in incorrect state POSTINITIIALIZATION and forced into state SERVER_STOPPED." At least that's what the run.bat file says.run.bat i linked that too but i dont know if it'll help much. crash-2021-03-04_12.22.51-server.txt
    • diesieben07
      java.lang.ExeptionInInitializerError: null

      By diesieben07 · Posted 34 minutes ago

      Show your code.
    • heavengel
      error minecraft this server has mod that requires forge to be installed on client

      By heavengel · Posted 41 minutes ago

      Hello   When I try to get in the server there's this message appearing : error minecraft this server has mod that requires forge to be installed on client But it happens that there is NO mod installed on the server, how is this message appearing then ?  Can someone help me please
    • diesieben07
      Can't launch Forge because of spongepowered.[...].MixinTweaker

      By diesieben07 · Posted 1 hour ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • chaskuchar
      0
      is there any release i can play past 1.16.4

      By chaskuchar
      Started 3 minutes ago

    • Herobrine510
      0
      modded server problems

      By Herobrine510
      Started 7 minutes ago

    • We Random
      1
      java.lang.ExeptionInInitializerError: null

      By We Random
      Started 1 hour ago

    • heavengel
      0
      error minecraft this server has mod that requires forge to be installed on client

      By heavengel
      Started 41 minutes ago

    • Leetram_519
      1
      Can't launch Forge because of spongepowered.[...].MixinTweaker

      By Leetram_519
      Started 1 hour ago

  • Who's Online (See full list)

    • chaskuchar
    • Ommina
    • ivanbj
    • Herobrine510
    • elpanzas
    • CookieLukas
    • iiLoadingx
  • All Activity
  • Home
  • Minecraft Forge
  • General Discussion
  • How was Forge created, as well as others?
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community