Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,67 @@

## English Version


## Contributing to TFG


We highly recommend using `git`, though it's technically optional.
Either install Git or skip to "Contributing without git" if your change is a single file and you do not wish to use Git.

## Setting up a dev instance

For most changes, setting up a dev instance is optional. Refer to the sections on making changes to kubejs and Core if you're making a simple change.

1. Get the latest version of Modpack-Modern and unzip it once
- Go to [Modpack-Modern's Actions](https://github.com/TerraFirmaGreg-Team/Modpack-Modern/actions), pick the latest project build and download the multimc artifact at the bottom of the page.
2. Create a new Prism Launcher instance and import the `TerraFirmaGreg-Modern-build-XXXX-multimc.zip` file.
3. Update the Core-Modern jar
- Go to [Core-Modern's Actions](https://github.com/TerraFirmaGreg-Team/Core-Modern/actions), pick the latest project build and download the artifact at the bottom of the page.

1. Create a new Prism Launcher instance with Minecraft version 1.20.1 and Forge.
2. Get the latest version of [Modpack-Modern](https://github.com/TerraFirmaGreg-Team/Modpack-Modern)
- If you are familiar with Git, clone your fork of Modpack-Modern.
- If you have never used Git or do not plan to, click the green `<>` button and choose "Download ZIP".
3. Paste the contents of Modpack-Modern into your instance's `minecraft` folder.
- The `kubejs`, `config`, `defaultconfigs`, etc. folders should be in the same directory as `saves` and `mods`.

If your mods are outdated or not present, or you downloaded the modpack by cloning Modpack-Modern, you will need to update pakku by running `java -jar pakku.jar fetch` in your instance's `minecraft` directory.
- Open your command prompt.
- Type `cd C:\Users\DEVELOPER\AppData\Roaming\PrismLauncher\instances\INSTANCE\minecraft` where `C:\...\minecraft` is the path to your instance's Minecraft directory.
- Type `java -jar pakku.jar fetch`.
- If you get a message claiming that Java does not exist, use `C:/.../javaw.exe -jar pakku.jar` where `C:/.../javaw.exe` is the path to a Java executable. You can find the path to your Java executable by opening the settings of your instance in Prism Launcher, going to "Java", and clicking "Detect".

### Recommended Environment

We recommend the following if you plan to make large changes that span Core, Modpack, and Tools.

1. Set up a dev instance for Prism Launcher.
2. Make forks of Modpack-Modern, Core-Modern, and Tools-Modern and clone them.
3. Symlink your Modpack-Modern `kubejs` folder into your Prism Launcher instance.
- windows: `mklink /D C:\Users\user\AppData\Roaming\PrismLauncher\instances\INSTANCE\minecraft\kubejs C:\Users\user\tfg\Modpack-Modern\kubejs`
- unix: `ln -s /.../Modpack-Modern/kubejs /.../minecraft/kubejs`
4. Test your changes by building your Core jar, adding it to your instance, and launching it.

If you're using VS Code, you may want to try [ProbeJs](https://marketplace.visualstudio.com/items/?itemName=Prunoideae.probejs) for kubejs changes (optional).

<details><summary>note on VSCode</summary>
To properly use VSCode to work with Core, you will need the Extension Pack for Java extension. You can easily open a directory with modpack, core and tools. If you clone mods included in tfg into the directory, your language server will be able to recognize them. This is especially useful for writing mixins.
</details>

## Making changes to TFG

To edit recipes and configs, make changes in the `kubejs`, `config` and `defaultconfigs` directories of your instance. To test your changes in-game, use the `/kubejs reload ...` command.


If your changes include any user-facing text (such as tooltips or quest content), place it in [Tools-Modern](https://github.com/TerraFirmaGreg-Team/Tools-Modern) under the `LanguageMerger/LanguageFiles/` directory. For example, LV age quest contents go to `LanguageMerger/LanguageFiles/tfg/en_us/Quests/low_voltage.json`. Translations should be submitted via Crowdin after your changes have been merged.

More complicated changes typically need to be made in `Core-Modern` using Java.
If you're using IntelliJ, you can use Gradle to compile Core with `jar` and test your changes with `runClient`.
If you don't use IntelliJ, you can compile Core from the command line by running `./gradlew.bat jar` and test it with `./gradlew.bat runClient`.

To test Modpack and Core changes together, copy the built jar file into your Prism Launcher instance.


### 1. Required and Recommended Software

#### Required Software
Expand Down