4
Java edition code source
i am looking inside of the minecraft code, i can find the block textures, recipes, loot tables by unpacking the version jar file but not things like villager trades, mob behavior, world rules, block spawn distributions etc
are they in the encrypted class files or are they in the launcher? they must be somewhere. i know "install mods" but the mods must work on something in the games source. where is the rest of the games code located and how do i read it?
i am looking at java versions before 1.19
are they in the encrypted class files or are they in the launcher? they must be somewhere. i know "install mods" but the mods must work on something in the games source. where is the rest of the games code located and how do i read it?
i am looking at java versions before 1.19
7
You'd likely want to look into modding, such as with Fabric (Kaupenjoe is a great tutor for that as well)
he goes over everything in immense details for you, from start to finish and for numerous versions :D
All the non-data logic is in the game JARs (client.jar/server.jar) as obfuscated Java under net.minecraft not in the launcher. Decompile (Vineflower/CFR) and apply mappings MCP (1.8–1.12.2), Yarn (1.14+), Mojang (1.16+) then check GameRules, villager trade classes, spawner/biome code; older worldgen is code (WorldGenMinable), newer uses data/minecraft/worldgen JSON. Mods hook this via Forge/Fabric events/Mixins after remapping.
please explain it to me like i dont understand what i am doing
how do i use decompiler.jar and how do i recompile it so it works
All the logic is in client.jar or server.jar under net.minecraft. To just read it, download CFR from https://www.benf.org/other/cfr/ and run: java -jar cfr.jar server.jar --outputdir out. The names will look like gibberish and you cannot recompile that. If you want readable names and something you can actually run, use a mod template. Fabric example mod: https://github.com/FabricMC/fabric-example-mod (clone, open in IntelliJ, run ./gradlew genSources then ./gradlew runClient). Forge MDK: https://files.minecraftforge.net/ (download MDK, unzip, import, run the Gradle tasks). Then search the mapped sources for GameRules, villager trades, spawns, and biome code, and make your changes as a mod instead of touching the game jar.
