× Tutorials about Modelling and Texturing form Minecraft

Gradle Tutorial

  • Posts: 1798
  • Karma: 40
  • Thank you received: 52

Manus created the topic: Gradle Tutorial

Few weeks ago the old Forge MCP was replaced by a new system called Gradle. Gradle is a coding tool which makes MCP more flexible.

Since this replacement the old MCP SRC Version can’t be installed due to an error because forge replaced the server routines.
Therefore you need to install the new Gradle system now if you want to code in MC.

Setup Forge

1. Download Minecraft Forge Src Version. Download a 1.7.2 Version, I prefer the Recommended.
You can download Forge [link=http://files.minecraftforge.net/]HERE[/link].



2. Create a new folder and unpack the just downloaded file to this folder.


3. SETUP 1.6.4 ONLY
a. Open the build.gradle file with an editor


b. Change line 14 to the correct snapshot version. Each Forge version requires a specific snapshot:
Snapshot 1.0 -> Forge 960-964
Snapshot 1.1 -> Forge 967-1047
Snapshot 1.2 -> Forge 1048+
For the latest 1.6.4 version change the line to classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'


c. Change line 25 to the correct forge version. For the latest 1.6.4 version change the line to version = "1.6.4-9.11.1.964”


d. Save and close the file

4. Open a command window and change the directory to the folder from step 2.


5. Input “gradlew.bat setupDecompWorkspace” in the window and press enter. Gradle will start downloading stuff. This will take few minutes but it’s much faster than the old system.





Since 1.7.10 Gradle requires another step at this point:
5a. Input “gradlew.bat setupDevWorkspace” in the window and press enter. Gradle will start downloading stuff. This will take few minutes.



6. Input “gradlew.bat eclipse” in the window and press enter. Gradle will start downloading some more stuff.



7. SETUP 1.6.4
Download the 1.6.4 Gradle Flan Source from this page.
You can download it [link=http://www.minecraft-smp.de/download.php?list.113]HERE[/link]


SETUP 1.7.2+
Go to github and download the latest source.
You can download it [link=https://github.com/FlansMods/FlansMod]HERE[/link]


8. Unpack the downloaded file, you will see both, gradle and the unpacked source have the same file/folder structure.


9. Copy all unpacked files into the Gradle folder, overwrite existing files.


10. Open eclipse
Press File -> Switch Workspace -> Other

[img]gradle10b.png

11. Select the eclipse folder which is located inside the folder from step 2.



12. Delete the example mod. We don't need it and it will cause errors in 1.6.4


13. Press start


14. Enjoy Minecraft



The packages are now located in the Eclipse folder


The models are in located in
1.6.4:
src/main/java/co/uk/flansmods/client/model
1.7.2:
src/main/java/com/flansmod/client/model



How to build a class file (formally known as reobfuscate)

1. Open a command window and change to your gradle folder


2. Input "gradlew.bat build" into this window, press enter.


3. Wait till the process is finished.


4. Go to your gradle folder.


5. Go to build.


6. Go to libs. Ignore the folder classes. It contains class files but they will not work with flans mod.


7. Open Flan Mod java file with winrar or an equal tool.


8. Navigate to the files folder. Copy the files you need.


9. End of story :)

#30148
The topic has been locked.
  • Posts: 5206
  • Karma: 40
  • Thank you received: 50

TheOrion replied the topic:

Uhh.. okay, But it means if i own an old 1.6 MCP i Can Still use it?



MVP Ostwind
#30149
The topic has been locked.
  • Posts: 1798
  • Karma: 40
  • Thank you received: 52

Manus replied the topic:

jepp

#30151
The topic has been locked.
  • Posts: 5206
  • Karma: 40
  • Thank you received: 50

TheOrion replied the topic:

[quote1399821948=Manus]
jepp
[/quote1399821948]
Okay thats good



MVP Ostwind
#30150
The topic has been locked.
  • Posts: 3091
  • Karma: 1
  • Thank you received: 1

Jedwards98YT replied the topic:

Thanks manus this is really helpful!

#30156
The topic has been locked.
  • Posts: 787
  • Thank you received: 17

Kevin replied the topic:

for the setupdecompworkspace you could use
gradlew setupdecompworkspace --refresh-dependencies eclipse

#30159
The topic has been locked.
 
Latest Forum Posts
 
Latest Blog Posts
 
User Online
 
User Menu