Mod developers were able to get the source code for Minecraft through a developer program over a decade ago. I'm not sure that it is still the case. I think they are just de-obfuscating the compiled CLASS files so anyone can decompile them without access to the source.