Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are the source files for forge?

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.

like image 914
lllendexll Avatar asked Jun 03 '14 21:06

lllendexll


2 Answers

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.

like image 174
Felipe Ignacio Pezoa Pinochet Avatar answered Oct 02 '22 05:10

Felipe Ignacio Pezoa Pinochet


You can find the source for Minecraft Forge at the Minecraft Forge github repository. You can also find the FML source code at the FML github repository. However, the minecraft source code is private, so you have to decompile it yourself with ./gradlew setUpDecompWorkspace

like image 32
Universal Electricity Avatar answered Oct 02 '22 05:10

Universal Electricity