Whether its a windows PC, a linux computer, or a server, if Minecraft runs, you can mod it.

But before you start downloading a bunch of mods and just dump it right in the Minecraft folder, might as well learn the basics of how it works.

How does a mod work?

a Mod is an application that injects code into another, essentially modding them. this can be as easy as Just Another Application, or you really have to go over the top reading essentially machine code just to figure out relatively how it works. Why is this?

a program.

do you wonder how many programs have different versions for different OSes? how when you open them with Notepad it displays nonsensical characters?

programs are made by humans (hopefully). they learn a programming language. and write with it. Machines, however, dont like this, so it has to be Compiled.

a Compiled program is already in machine code. when compiling, the computer translates your source code into byte code. lots of info is lost in the translation to byte code, and each machine has different ways to interpret byte code, so that might explain why one program in an OS cant be run in another.

another type of program is Interpreted program. it is human readable code and is compiled and run at the same time. your browser supports JavaScript, which is interpreted. Python is interpreted.

Java is wack. it is compiled but it is also interpreted. it is byte code but it has way more info. Try extracting a .jar file like a zip file and view them. you run a .jar file through a JRE. The JRE is os dependent so the .jar files dont have to.

Decompilers are programs that decompile machine codes. That is, they take the byte code and try to make a source code that compiles to that byte code. that is far from a simple task, and some can only go so far. losses of code are inevitable.

However lucky for Minecraft Java modders, java is easier to decompile.

this program.

Minecraft can be fully decompiled. from the myriad of .class files that you can see if you unzip the jar file, to java code. no code is lost, supposedly. but their naming is wack.

This is due to obfuscation, a process that randomizes names. This is why even with the Minecraft Source code, mods are still hard. the names are obfuscated, and with each version the names get mixed up.

while this process is for protection: a random someone cant just decompile the game and steal the source code for something else, it also unintentionally hinders the programmers understanding of the games code.

To fix this, they studied the whole entire game code (millions of lines of code) and made a sorta table thing to translate the names back to something descriptive, something you would understand. Its called an obfuscation map.

a mod

as you are gradually figuring things out about the program, you start to modify some parts of it to your liking. For example, in the game Geometry Dash, people have been replacing textures, the menu song, and the practice mode song for a long time. edits to the images or sound files that the program uses are modifications to the game.

if you are more advanced, you start figuring things out in the game code and understand what it does.

you start disassembling and decompiling the game as much as the technology allows. Dissasembling is a process that rewrites the bytecode in a human readable way. the rewritten file, now in Assembly – a programming language – still pretty much describes whatever is run by the machine. decompilers might further rewrite code in a higher language.

You start working with the program and the files, using multiple delicate, complicated tools to see what parts of the game are controlled by what files and how they do it.

Then with the info on hand, you make necessary modifications to the game. Maybe its an addition of a menu, or some visual help to gameplay. Maybe its a modification to gameplays physics or speed. maybe its some improvements to the speed of the program. Maybe its an addition of entirely new mechanics.

That is modding.

ways of mod.

there are 2 ways to mod a game, (at least thats what i think)

the first one is just you modifying the program yourself. You start working with the files, dlls, trying to figure out what each of them does and make necessary changes to the files.

Doing this takes real skills. some of the games are hard to mod, and to understand the game to mod they really do have to pull all the investigation tricks. i remember a video talking about a dud who fixed GTA 5 loading time, they have to hunt for specific memory addresses and do magic with it

I for one can NEVER do that.

About making edits to the files, while as a developer you might slightly have a clue whats going on, but as an end user this is much harder. Minecraft and its mods are just class files running other class files, and if two mods decide to use the same class file you are cooked. so for a person to have a custom modpack going in the early days it would take a lot of mingling time and real effort.

the second way is through a modloader, such a program does the modifying of the files for you. modloaders add methods for you to interact with the base game without you touching the files yourself. you write mods, modloader loads mods to game.

it also reorganizes things so your mods do not clash if multiple mods happen to interact with the same thing. unless a mod happens to rewrite big parts or the whole thing then its up to the modders to make the mod work with other mods

some games have extensive documentation of how to mod, so it skips the hard part of manually understanding the game. it is also much more forgiving to the average user

this games mod

in the old days, mods for Minecraft was written for the base vanilla game. so its the first way of mod, requiring you to have an understanding of the ugly game code, and how to modify it. After that there is Forge, Liteloader, Fabric, many different mod loaders that alleviate modders from redundant investigations of the games code; and that is the second way of mod. These modloaders use different methods and different naming systems, so one mod for one modloader might (likely) not work for another loader. And the base game changes itself so there is that too.

What this means for the Users

to sum up: Modding is a real thing. it is hard. Specific programs are harder to mod than others, from different ways programs are packaged. Programmers had to understand the program they are writing mods for, and as they understand more it saves learning time for the average programmer and confusing time for the users.

Minecraft modding from the early days was dangerous, as the users had to edit and swap out mod files themselves. Any two mods would break for the users if they happen to modify the same file. Nowadays as loaders get developed it gets much easier for the user to install some mods and get the game to run. As of today the usual process of installing mods is as follows.

how to install mod

that is an ok technical understanding of mods. such info is often not required / trivial for you to install mods to a game or even make the mods urself (through a modloader or idk).

now if you knew what tf was above and how i am wrong about it, please go straight to the comments section and absolutely debunk my damn ass. If not, and if you cant install a mod. here is a lil tutorial from me.

If you dont have a Minecraft launcher, i recommend Prism Launcher for paid players and Legacy launcher for cracked players. Please however DO NOT use software from tlauncher.org because it is run by the bad people of russia. it also got flagged so hard in virustotal

I assume your launcher is as bare bones as the Official Minecraft launcher. Unlike Prism Launcher which does all the stuff for you, you now do it yourself.

choose the right mod

because you read, mods are dependent on the version of the game, and the version of certain modloaders. some mods are dependent on others.

so if you had a list of mods that you want to add, for their gameplay for example, then you would want to choose the right version of the mods. This info is shared by the mod page.

in this post, i assume most of your mods are either for Forge or Fabric, and many of them are for the Minecraft version 1.20.4 your mods all support one common loader, version of loader and version of the game. so it can be Fabric 0.15.9 for Minecraft 1.20.4, for example. or forge 48.1.0 for mc 1.20.2, but who uses forge anymore

for this information please check the download page of each mod for the right loadout. consider removing outdated ones. READ CAUTION

i do have a list of mods i use.

CAUTION!!

ONLY DOWNLOAD FROM 2 SITES. Modrinth, and Curseforge. 9minecraft is absolutely fraud (ran by a vietnamese, most of the mods contain viruses, some others are stolen). be careful with planet minecraft. other sites are fraud by default. you can download from github, where the code is open source, and it is likely to not have viruses (not 100%).

ONLY DOWNLOAD FROM OFFICIAL WEBSITES, from the mod author for example. pvp clients websites is also a good example. check reviews from the community (reddit ofc)

ALWAYS CHECK FOR VIRUSES. research so your mods dont have a keylogger in it. virustotal. dont download from discord (dont even think). THE INSTANCE YOU RUN MINECRAFT WITH VIRUS INFECTED MODS IT IS OVER. turn off internet. check startup apps. logout and change ALL passwords. scan your disks with multiple AVs. leave rats in a bank_account folder as a counter-attack.

Java programs, however safe might be, are considered viruses by some AVs. we dont care. virustotal

the tutorial

before everything

so yeah you chose a version, a modloader, and a bunch of mod. multiple pages of modrinth and curseforge are ready. oh but does minecraft run?

oh no. Minecraft Java needs… java. Check if you have a java probably by going to the terminal and go java -version. do a where java with where.exe java or whereis java.

oh no. no java. install java by either going to adoptium for temurin or azul for zulu or just dnf install java*tab completion* i fucking guess

you should choose jdk. it is the most bestest with no stripped/lite features, and you have a computer

see notice below. minecraft should need java 8, 16 or 17 for 1.17+ i think and 21 for 1.20.5+.

the wiki knows better.

(rewording other parts of this blog is certainly something)

locating the mod folder.

WHERE IS MINECRAFT??????? That might be your question. If your Minecraft Launcher doesnt have buttons that open the damn files for you, switch launchers bro.

the entirety of your minecraft instance is in a folder.

for macs it might be in ~/Library/Application Support/minecraft. do a cmd shift g to bring up the Go to folder window and paste that in.

for win pcs it might be in %APPDATA%\.minecraft. paste that in the file explorers top bar.

for linux idfk for me (i use prism) they hide it in ~/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/(name of instance)/.minecraft for some damn ass reasons. you should find it in ~/.minecraft,

check with your launcher. they have buttons that open the right directories for you

install the modloader

links are right there.

Forge and Fabric can be downloaded here. they are installers, and they will do most of the work for you. Read carefully. Choose the game directory found above if the installers cant find it.

You might need to have an installation of the game ready. the jar file that is the game, if you know what i mean. Just install and launch a minecraft version then quit the game, then continue. you should find it in (.minecraft/)versions. Prism hides it somewhere else (lib).

then to the mods

after that it is as easy as dragging and dropping.

Because you have a modloader, it should add a mods folder for you, so that means there is a folder named ‘mods’ in your .minecraft. if not add them yourself,

then dump your mods in there.

notice

if you just downloaded and jumped to modding right away, ok dude calm down, and you also need to check the Java version.

minecraft java runs with java (duh) but only with specific javas. if your launcher dont ship with the right java, or it is broken, or you want a custom java you will have to download install and use the right java. For that check this out: System requirements

be careful as some people like to make installers, and they dont use the java you use. so Such a hassle

Some mods are dependent on others. Rely on the readme page of the mod for info there. If you cant give a fuck about your computer, the game will crash, and hopefully notice you.

some mods do clash with each other. it will either lead to crashes or things not working as intended. Refer to their mods page, do some research, and leave an issue in their forum (discord). if you are VERY sure, ABSOLUTELY 100% sure it is a brand new bug go make a detailed issue page on their github.

Other problems

For bedrock users

yall dont have mods. but you have Addons. well, the add button is there, and addons are relatively safer because aint no way an addon is getting your google chrome cache or your password.

To explain addons, it is an official way Minecraft allows modding over there. and people say they are a bit limiting, but so far all the impressive addons earned their impressive badge

Datapacks?

Datapacks are also kinda like addons. a datapack can change or add so so many things, from structures to worldgen, custom achievements, custom items, etc. if you are good.

you apply a datapack when you are making a world? right

also honestly here datapack modding is hard af yall datapack modders are 5head

i tried to make an armor detector stripper thing with command blocks, not even a datapack and holy moly is it hard

also i didnt know that some mods are just datapacks in disguise (they just add datapacks to world thats it)

Read more over here i guess


Comments

One response to “How to add mods to Minecraft.”

  1. this blog is full of yaps and no real knowledge

comment below!