💾 Archived View for gem.arisamiga.rocks › post › minecraft.gmi captured on 2023-07-22 at 16:35:13. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-04-26)
-=-=-=-=-=-=-
Hello!
For a long time, I have been a fan of the popular block game Minecraft and I always was wondering how does it work?
I have been trying to find a way to see the code of Minecraft but I couldn't find a way to do it.
Then I found a video by
where he reversed engineered Minecraft code and explains how it works.
{{< youtube OXdFckukh2I >}}
I was very interested in this and I wanted to try it out myself.
So I Used something called
which is a set of open Minecraft mappings, free for everyone to use. The intention is to let everyone mod Minecraft freely and openly, while also being able to innovate and process the mappings as they see fit.
Yarn has also something called **mapNamedJar** which is a command you can use with Gradle to generate a named jar file so you can decompile the jar file and have all of Minecraft's code.
What is Gradle?
Gradle is a build automation tool known for its flexibility to build software. A build automation tool is used to automate the creation of applications. The building process includes compiling, linking, and packaging the code. The process becomes more consistent with the help of build automation tools. Gradle is widely used for mod/plugin development in Minecraft.
What are mappings?
define the names of classes, fields and methods. So instead of having random letters you can have readable classes.
So I used the command `./gradlew mapNamedJar` and it generated a jar file called `named.jar` which I decompiled using
This can be very useful in the long term as I can use this to make my own mods for Minecraft and also try to understand how Minecraft works!
Another thing I found was something called Mixins which is a library that allows you to modify the code of Minecraft without having to recompile it.
Mixin is a feature made by
which is a Minecraft modding API.
{{< youtube Hmmr1oLt-V8>}}
Here is another Video by
where he explains how Mixins works. Its a very good video and I recommend you to watch it!
I think learning things from something you enjoy for example Minecraft is a amazing way to learn.
By reading Minecraft code and using Mixins I understood how Multiplayer works and how Minecraft handles network packets which is pretty fascinating.
Well, I hope you enjoyed this post sorry that it was a bit short.
Thank you for reading :D