User Tools

Site Tools


tutorial:setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:setup [2020/03/29 15:44] – [Manual Steps] form -> from jamieswhiteshirttutorial:setup [2020/04/27 06:25] – ./gradlew, not .gradlew upcraftlp
Line 19: Line 19:
  
 You can generate the Minecraft sources for reference (since IDEA already has a decompiler this is only useful for searching through the code) : You can generate the Minecraft sources for reference (since IDEA already has a decompiler this is only useful for searching through the code) :
- Run the ''genSources'' Gradle task. If your IDE doesn't have Gradle integration, then run the following command in the terminal: ''gradlew genSources'' (or ''.gradlew genSources'' on Linux/MacOS).+ Run the ''genSources'' Gradle task. If your IDE doesn't have Gradle integration, then run the following command in the terminal: ''gradlew genSources'' (or ''./gradlew genSources'' on Linux/MacOS).
        
 === IntelliJ IDEA === === IntelliJ IDEA ===
 If you are using IntelliJ IDEA by JetBrains, please follow these steps: If you are using IntelliJ IDEA by JetBrains, please follow these steps:
-    - Run ''gradlew idea'' first, then import the Project to IDEA+    - In the IDEA main menu, select 'Import Project(or File -> Open... if you already have a project open). 
-    - In order to run/debug your project, go to menu ''Run -> Edit Configurations...''In ''Run/Debug Configuration'' dialog, find ''Application Minecraft Client'' and change ''Use classpath of module'' from ''[ProjectName]'' to ''[ProjectName].main'', then change for ''Application > Minecraft Server'' as well. After pressing OKyou will know see Minecraft Client and Minecraft Server now showing up at Run/Debug Toolbar.+    - Select the project's build.gradle file to import the project. 
 +    - After Gradle is done setting up, close (File -> Close Project) and re-open the project to fix run configurations not displaying correctly
 +    - (If the run configurations still don't show up, try reimporting the Gradle project from the Gradle tab in IDEA.) 
 + 
 +//Optional, but recommended//: 
 +By defaultIntelliJ delegates to Gradle to build the projectThis is unnecessary for Fabric and causes longer build times and hotswapping related weirdness, among other problemsTo make it use the builtin compiler: 
 +    - Open the 'Gradle Settingsdialog from the Gradle tab. 
 +    - Change the 'Build and run using' and 'Run tests usingfields to 'IntelliJ IDEA'
 +    - Go to File -Project Structure -> Project and set 'Project compiler outputto the 'outsubdirectory of your project, if it isn't set yet. This directory doesn't have to exist, IDEA will create it when compiling the project for the first time(Tip: Use the 'Project Directorybutton in the directory select dialog to quickly jump to your project directory.) 
 + 
 +Unfortunatelyit is currently impossible to set an IDE-wide default for the 'Build and run usingand 'Run tests usingoptionsso these steps have to be repeated for every new project.
  
 === Eclipse === === Eclipse ===
tutorial/setup.txt · Last modified: 2024/04/15 00:35 by solidblock