Reputation: 81
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.
Upvotes: 6
Views: 11040
Reputation: 775
You can find the source for Minecraft Forge at the Minecraft Forge github repository. However, the minecraft source code is private, so you have to decompile it yourself with ./gradlew setUpDecompWorkspace
Upvotes: 3
Reputation: 1
Dude: In eclipse, click in Referenced Libraries,
Upvotes: -2
Reputation: 19780
There is no longer a direct task that will decompile Minecraft with Forge for Minecraft 1.14. You can cause the sources to be generated by running the eclipse task.
First, make sure the eclipse plugin is applied in build.gradle:
apply plugin: 'eclipse'
Next, run the eclipse task and let it run:
./gradlew eclipse
Now the Minecraft sources should be in an output.jar located at:
Linux:
~/.gradle/caches/forge_gradle/minecraft_user_repo/mcp/<MC VERSION>-<TIMESTAMP>/joined/patch/output.jar
Windows:
C:\Users\<USER>\.gradle\caches\forge_gradle\minecraft_user_repo\mcp\<MC VERSION>-<TIMESTAMP>\joined\patch\output.jar
Upvotes: 2
Reputation: 41
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.
Upvotes: 4
Reputation: 3780
Forge never decompiles the Minecraft sources, in versions for 1.6.4 and earlier it included MCP (Minecraft Coder Pack) which decompiled the sources for you, however there has not been a MCP version for 1.7.2 and as such Forge for 1.7.2 and later does not include it.
Upvotes: -1