Skip to content

Commit 7f54d23

Browse files
committed
Update CONTRIBUTING.md
1 parent a8dd03f commit 7f54d23

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,72 @@
3535

3636
## English Version
3737

38+
39+
## Contributing to TFG
40+
41+
42+
We highly recommend using `git`, though it's technically optional.
43+
Either install Git or skip to "Contributing without git" if your change is a single file and you do not wish to use Git.
44+
45+
## Setting up a dev instance
46+
47+
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.
48+
49+
1. Create a new Prism Launcher instance with Minecraft version 1.20.1 and Forge.
50+
2. Get the latest version of [Modpack-Modern](https://github.com/TerraFirmaGreg-Team/Modpack-Modern)
51+
- If you are familiar with Git, clone your fork of Modpack-Modern.
52+
- If you have never used Git or do not plan to, click the green `<>` button and choose "Download ZIP".
53+
3. Paste the contents of Modpack-Modern into your instance's `minecraft` folder.
54+
- The `kubejs`, `config`, `defaultconfigs`, etc. folders should be in the same directory as `saves` and `mods`.
55+
4. Update pakku by running `java -jar pakku.jar fetch` in your instance's `minecraft` directory.
56+
- Open your command prompt.
57+
- Type `cd C:\Users\DEVELOPER\AppData\Roaming\PrismLauncher\instances\INSTANCE\minecraft` where `C:\...\minecraft` is the path to your instance's Minecraft directory.
58+
- Type `java -jar pakku.jar fetch`.
59+
- 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".
60+
5. Update the Core-Modern jar
61+
- 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.
62+
63+
### Recommended Environment
64+
65+
We recommend the following if you plan to make large changes that span Core, Modpack, and Tools.
66+
67+
1. Set up a dev instance for Prism Launcher.
68+
2. Make forks of Modpack-Modern, Core-Modern, and Tools-Modern and clone them.
69+
3. Symlink your Modpack-Modern configs and `kubejs` into your Prism Launcher instance.
70+
- `mklink /D C:\Users\user\AppData\Roaming\PrismLauncher\instances\INSTANCE\minecraft\kubejs C:\Users\user\tfg\Modpack-Modern\kubejs`
71+
4. Test your changes by building your Core jar, adding it to your instance, and launching it.
72+
73+
If you're using VS Code, you may want to try [ProbeJs](https://marketplace.visualstudio.com/items/?itemName=Prunoideae.probejs) for kubejs changes (optional).
74+
75+
<details><summary>note on VSCode</summary>
76+
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.
77+
</details>
78+
79+
## Making changes to TFG
80+
81+
### Editing recipes, mod configs and loottables
82+
83+
To edit recipes and configs, make changes in the `kubejs` directory of your instance. Check out the TerraFirmaGreg wiki for guidance on using kubejs. To test your changes in-game, use the `/kubejs reload ...` command.
84+
85+
86+
### Adding user-facing text
87+
88+
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.
89+
90+
For example, LV age quest contents go to `LanguageMerger/LanguageFiles/tfg/en_us/Quests/low_voltage.json`.
91+
92+
Translations should be submitted via Crowdin after your changes have been merged.
93+
94+
### Editing behavior, adding mixins, ...
95+
96+
More complicated changes typically need to be made in `Core-Modern` using Java.
97+
98+
If you're using IntelliJ, you can use Gradle to compile Core with `jar` and test your changes with `runClient`.
99+
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`.
100+
101+
To test Modpack and Core changes together, copy the built jar file into your Prism Launcher instance.
102+
103+
38104
### 1. Required and Recommended Software
39105

40106
#### Required Software

0 commit comments

Comments
 (0)