Setting up your Dev Environment

From Doggy Talents Next Wiki
Jump to navigation Jump to search

To get started modding or working on the source code, a crucial part is to set up a good dev environment so that you can utilize its features and tools to better assist in the code.

- DashieDev -


Difficulty: 🦴🦴🦴🦴

Required Installation:
Required Knowledge:
  • Need to have basic/advanced coding knowledge.
  • Need to know how to push/pull commits, and pull requests from your fork on GitHub.

Initialization

GitHub for Desktop

Initialization

  1. Download the necessary installations and proceed.
  2. Log in to your GitHub account (create one if you don't have one).

Cloning Repository

  1. After you log in to Github for Desktop, you can start Cloning repository.
  2. Click on URL Tab:
    • First box: https://github.com/DashieDev/DoggyTalentsNext
    • Second box: Make an empty folder (make sure the folder is named properly in English). That'll be the location for the project.
  3. Click on Current branch -> New branch. Then, choose your version.
    • The name should reflect which version you're on (optionally your name) and what you're trying to do. (eg. 1.20-master$MashXP-Testing)
    • Note that if you're using our branch to test your changes, you cannot push your changes there since you don't have write access. And for that reason, we recommend you to locally clone one of our branches as stated above.
  4. Open in VSC.

Visual Studio Code

Initial Build

  1. After you click Yes on the Trust the Authors confirmation. VSC will recommend you install these extensions:
    • Extension Pack for Java. (mandatory)
    • GitHub Pull Requests and Issues (Optional)
    • Gitlens (Optional).
  2. Open Terminal (Ctrl + `). Type ./gradlew build, enter, and let it finish.
Deprecated Gradle features were used in this build, making it incompatible with...
...
BUILD SUCCESSFUL in...

If you encounter this error: Follow this instruction

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

If you did it correctly, there should be a .vscode folder in your project.

Reload and Execute

  1. Go to settings.json (shortcut Ctrl+P)
  2. Add the line "java.gradle.buildServer.enabled": "off". Remember to add a comma at the end of the line above
  3. Reload your project. (a notification board should pop up at the bottom right corner.)
  4. Ctrl+P + > Java: Clean Java Language Server Workspace.
  5. Press f5.
  6. After this step, you should see Minecraft boots up along with DTN.

From here on you can experiment with DTN.

Acknowledgment

VSC

Coding with Visual Studio Code (VSCode) offers several benefits that make it a popular choice among developers:

  • Multi-Language Support: VSCode provides support for hundreds of programming languages, making it versatile for different types of projects.
  • Cross-Platform: It is available on macOS, Linux, and Windows, so you can work on your projects regardless of the operating system.
  • IntelliSense: This feature offers intelligent code completion, suggestions, and rich semantic code understanding, which can significantly speed up coding and reduce errors.
  • Interactive Debugging: VSCode includes an interactive debugger that allows you to step through code, inspect variables, view call stacks, and execute commands in the console.
  • Customization: You can customize every feature to your liking and install third-party extensions to enhance functionality. (Use dark theme if you're a true coder >:3)
  • Git Integration: It has built-in support for Git, allowing you to work with source control without leaving the editor.
  • Extension Marketplace: A vast ecosystem of extensions is available to add functionalities for different tools, programming languages, and services.

These features contribute to a productive coding environment, whether you’re working on web development, data science, or other software projects.

Disclaimer: You can also use other source-code editors like IntelliJ IDEA to work with DTN but we won't be able to aid you with IDE-related issues.

GitHub

Coding with GitHub offers several advantages:

  • Version Control: GitHub uses Git, a distributed version control system, allowing developers to track and manage changes to their codebase efficiently.
  • Collaboration: It facilitates collaboration among team members, enabling multiple developers to work on the same project simultaneously with minimal conflicts.
  • Open Source Contribution: GitHub is a hub for open-source projects, providing a platform for developers to contribute to public repositories and collaborate with the global developer community.
  • Recovery Options: With GitHub, you can revert to previous versions of your code if something goes wrong, ensuring that mistakes can be corrected easily.

These features make GitHub a powerful tool for both individual developers and teams working on complex projects. Remember, it’s important to have basic to advanced coding knowledge and understand how to use Git for commits and pull requests.


I hope you find this guide helpful, feel free to ask any questions during the process (or maybe later on, i don't mind xD). Good luck!!! がんばってね〜!(⁠。⁠•̀⁠ᴗ⁠-⁠)⁠✧

Code dogs.png