I can tell you that it is not easy to get the source code from minecraft(and if it's even allowed, because of copyright issues). The source files have been compiled into a data layout which is unreadable for humans(except for those who have spent waaaay too much time in front of their display).
In order to get the source code for minecraft, the '.jar' file needs to be decompiled somehow. Even after decompilation, the resulting code will be a disaster to read, because names for all variables, functions and datastructures are not preserved after compiling. You can use the forge API in combination with 'eclipse'. Its purpose is to write mods for minecraft, but it also gives you access to the decompiled source(albeit read-only). They have basically gone through the trouble of defining the proper names in the code.
From there, you can make a copy of a specific class, alter it any way you like and compile it. The result is a '.jar' file. Notice that '.jar' is basically a zip archive, containing several '.class' files. You can then take the appropriate '.class' file out of the archive and use it to replace the '.class' file in the original source.
I have never tried this myself, but this seems like it would be worth a try if you really want to make changes.
Notice that the launcher sometimes redownloads the '.jar' file, which causes your changes to get lost. Also your changes are only applied to the version of which you altered the '.jar' file. If you update, then your changes are lost.
Once again, I have never tried this myself, so I'm not sure if this works. I've only been in the world of modded minecraft for a brief moment, because it was too much at once for me to really get into it.
I can tell you that it is not easy to get the source code from minecraft(and if it's even allowed, because of copyright issues). The source files have been compiled into a data layout which is unreadable for humans(except for those who have spent waaaay too much time in front of their display).
None of those are issues; you can just go over to http://www.modcoderpack.com/website/releases and download MCP (older releases are listed here) so you can decompile and modify the game yourself - the main developer of MCP is actually a Mojang employee. While not officially supported the EULA says that mods are fine as long as they are not used to hack/grief/play without buying the game or you directly distribute the source code or modified versions of the game (meaning the entire game, not some mod files), as also stated in the terms of use for MCP.
Also, I've never had issues with the launcher redownloading modified jars, you just have to know how to prevent it from happening (rename all the files and remove the download URL from inside the json for the version. This is what mod installers do automatically; for example, Optifine has an installer inside its jar but I just install it manually by placing the files into the Minecraft jar since I've always installed it that way and my own mods may interfere with the installer. I also provide a pre-modified json for my own mod since editing it is one of the more difficult/error-prone steps in installing mods manually. The only difference between Forge and jar mods (also termed "vanilla mods" since they modify a vanilla game without any modloader installed) is that Forge mods depend on a modloader to load them at runtime, which itself is installed as a "true" mod).
I want to try see Minecraft's java files, and I'm using a mac.
There was a mention of the source of a bug I want to try to fix:
https://bugs.mojang.com/projects/MC/issues/MC-123055?filter=allopenissues
Also, let's say I know what I'm doing and I made changes successfully, are there any risk factors upon Minecraft updates?
I can tell you that it is not easy to get the source code from minecraft(and if it's even allowed, because of copyright issues). The source files have been compiled into a data layout which is unreadable for humans(except for those who have spent waaaay too much time in front of their display).
In order to get the source code for minecraft, the '.jar' file needs to be decompiled somehow. Even after decompilation, the resulting code will be a disaster to read, because names for all variables, functions and datastructures are not preserved after compiling. You can use the forge API in combination with 'eclipse'. Its purpose is to write mods for minecraft, but it also gives you access to the decompiled source(albeit read-only). They have basically gone through the trouble of defining the proper names in the code.
From there, you can make a copy of a specific class, alter it any way you like and compile it. The result is a '.jar' file. Notice that '.jar' is basically a zip archive, containing several '.class' files. You can then take the appropriate '.class' file out of the archive and use it to replace the '.class' file in the original source.
I have never tried this myself, but this seems like it would be worth a try if you really want to make changes.
Notice that the launcher sometimes redownloads the '.jar' file, which causes your changes to get lost. Also your changes are only applied to the version of which you altered the '.jar' file. If you update, then your changes are lost.
Once again, I have never tried this myself, so I'm not sure if this works. I've only been in the world of modded minecraft for a brief moment, because it was too much at once for me to really get into it.
None of those are issues; you can just go over to http://www.modcoderpack.com/website/releases and download MCP (older releases are listed here) so you can decompile and modify the game yourself - the main developer of MCP is actually a Mojang employee. While not officially supported the EULA says that mods are fine as long as they are not used to hack/grief/play without buying the game or you directly distribute the source code or modified versions of the game (meaning the entire game, not some mod files), as also stated in the terms of use for MCP.
Also, I've never had issues with the launcher redownloading modified jars, you just have to know how to prevent it from happening (rename all the files and remove the download URL from inside the json for the version. This is what mod installers do automatically; for example, Optifine has an installer inside its jar but I just install it manually by placing the files into the Minecraft jar since I've always installed it that way and my own mods may interfere with the installer. I also provide a pre-modified json for my own mod since editing it is one of the more difficult/error-prone steps in installing mods manually. The only difference between Forge and jar mods (also termed "vanilla mods" since they modify a vanilla game without any modloader installed) is that Forge mods depend on a modloader to load them at runtime, which itself is installed as a "true" mod).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?