Where are the source files for forge?

lllendexll picture lllendexll · Jun 3, 2014 · Viewed 7k times · Source

When I try to open Block.class, or any other classes from the same package as Block.class, eclipse will say: "the source attachment does not contain the source for the Block.class. You can change the source attachment by clicking Change Attached Source below:"

What did I do wrong? Where's the source code then?

Also, when I type "extends Block", and hover my cursor over the word "Block" this appears:

net.minecraft.init.Blocks

Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found.

Answer

Just dogradlew setupDecompWorkspace in your forge folder and you will be able to see the source code (as long as you're working with forge 1.7+). Any way as far as I know your mod will run anyway without having the source attached, but sometimes it helps a lot to see minecraft source code.