Jump to content

How Does Forge Work / Load Mods / Edit Base Minecraft?


Recommended Posts

Hello all!


Sorry for the weird title, I'm not quite sure how to summarize my question. Let me begin by stating who I am and what I am trying to make. I am a student who's majority of Java knowledge comes from Honors Programming and AP Computer Science (where our teacher taught way more than the core curriculum). I am certainly not a Java God, but I believe I have a good understanding of how the language works.


I am hoping to make a "template" multiplayer RPG. I'm hoping to provide the structure and an API (oh wait, did I just answer my own last question?) so my classmates can have fun exploring Java. I'll be writing the network code and method for allowing users to add "mods" and have them sent to all other users on the (local, small) school network. I want them to be able to add in items and mobs. Eventually I'd like them to be able to write their own mechanics for the game. My main focus is creating something that is fun to play and learn with. I want to learn about how to program this and help my friends learn to program in Java.


My main question is how does Minecraft Forge allow others to write code and load that code in to Minecraft? While what I want to do is not related specifically to Forge, this is the closest I've seen to what I want to do.


If nothing else, could someone please tell me what this is called? I've tried Google'ing Java Injection, but I'm not quite sure if this is what I want. Again, just a name for what I am trying to do here would be great to help me look in to it more.


Thank you for your time!

Link to comment
Share on other sites

Ignore what dies said, designing something with ASM hacks in mind is bad, It's only done in Minecraft as a necessary evil.


Your question is simple.

How do you call a function in a class, when you don't know the name of the class?

How do you find all classes that have a function you want to call?


These are the fundamental questions for loading a mod.

Figure those out in any language you want and you're good.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.

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.

  • Create New...

Important Information

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