You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wiki/introduction/get-started.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -21,21 +21,20 @@ TODO: Is there anything more to be described here?
21
21
22
22
TODO: Create example code repository and put it here
23
23
24
-
This wiki contains pages that are best read in order. Certain articles in the
25
-
examples category have associated sub-pages, which are supplementary. Most pages will
26
-
contain code snippets, with full examples provided in
27
-
[the example code repository](https://example.com).
24
+
This wiki contains pages that are best read in order. Many of the articles, especially at the beginning, suggest other articles sensible to continue with. Most pages will contain code snippets, with full examples planned to be provided in example mods. (This is not done yet)
25
+
26
+
Additionally, you might account lines prefixed with `TODO: `. Those are notes for people working on the wiki what still needs to be done. For now, you can ignore them. Just know that there is more content to be inserted there.
28
27
29
28
TODO: Give an outline of all of the wiki articles once they're ready
30
29
31
30
## How to Learn Modding, for Beginners
32
31
33
32
Minecraft modding can get complicated. We aim to provide a resource to help you learn
34
33
fundamental modding concepts. However, there are some things that we can't do and
35
-
expect you to do on your own to learn.
34
+
expect you to learn on your own.
36
35
37
-
Asking questions properly, whether it be on our forum or on Discord, is an essential
38
-
skill to have. Never be afraid to ask questions, we're always willing to help and we
36
+
Asking questions properly, whether it is on our forum or on Discord, is an essential
37
+
skill to have. Never be afraid to ask questions, we're always willing to help, and we
Copy file name to clipboardExpand all lines: wiki/introduction/setting-up.md
+42-15Lines changed: 42 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -14,25 +14,30 @@ You'll need a couple of things before you can get started.
14
14
[Visual Studio Code](https://www.eclipse.org/ide/) can work, but it takes extra work to get set up.
15
15
- We recommend using IntelliJ IDEA as it has the most integrations and is the easiest to use.
16
16
17
-
## Template Mod Download (Java)
17
+
Next, you need to decide on whether you want to [download the template mod zip](#template-mod-download-zip-file) or [use the GitHub template](#template-mod-download-github-template). If you don't know how to use git, use the first method. However, it is recommended for you to have at least a GitHub account to get started and familiarize yourself with git quickly.
18
+
19
+
## Template Mod Download (ZIP file)
18
20
19
21
You can download the template mod from the [quilt-template-mod](https://github.com/QuiltMC/quilt-template-mod)
20
-
repository or use GitHub's template feature to generate a mod that you can use
21
-
straight away.
22
+
repository.
22
23
23
24
To download the ZIP file for the template mod, open the [GitHub repository](https://github.com/QuiltMC/quilt-template-mod),
24
-
then go to the `< >` button and press `Download ZIP`, or refer to the following image:
25
+
then go to the `< > Code` button and press `Download ZIP` as shown in the following image:
<imgalt="The GitHub repository with an arrow pointing to the code button, and another to the Download ZIP button inside the opened popup"src="/introduction/setting-up-1-light.png">
29
30
</picture>
30
31
31
-
Extract the ZIP file's contents into a folder of your choosing. Alternatively, if you
32
-
created a repository through GitHub, clone that repository using Git.
32
+
Extract the ZIP file's contents into a folder of your choosing.
33
+
34
+
## Template Mod Download (GitHub Template)
35
+
36
+
To use the [GitHub template](https://github.com/QuiltMC/quilt-template-mod), visit the [GitHub repository](https://github.com/QuiltMC/quilt-template-mod) and click the `Use this template` button. Follow through the dialog and clone that repository using git. Then you can continue.
33
37
34
38
## Setting up with IntelliJ IDEA
35
39
40
+
Now you need to set up your development environment. Open IntelliJ IDEA and follow through the initial setup dialog. Then, you need to open the project:
36
41
If you downloaded the template mod and extracted it into a folder,
37
42
import the project by pressing the `Open` button in the project listing.
38
43
If you made a GitHub repository with the template, use the `Get from VCS` button.
@@ -48,12 +53,33 @@ There is a plugin that adds additional support for Minecraft modding projects
After you opened the project, you should see a window looking roughly like this:
59
+
60
+
TODO: Embed screenshot
61
+
62
+
On the right and left side there are sidebars with icons to toggle different "Tool Windows". There are a few that you should know about: First, the folder icon in the top left toggles your `Project` tool window. With it, you can select the different files in your project. In the bottom left, there are the buttons for the `Terminal` and `Version Control System`. Additionally, after you tested your mod, there should also be a `Run` and a `Build` button. To the right are the `Notifications` and `Gradle` tool windows.
63
+
64
+
When you open a file, it should open a new tab in the editor in the middle. ^
65
+
Additionally, there are some things you might find not straight away: If you want to rename something, be it a file or a name of a variable or function, you can do so in the context menu under `Refactor > Rename`
66
+
51
67
## Making the Mod Yours
52
68
53
-
First, update `gradle.properties` to use your Maven group and mod ID.
54
-
If you don't know which Maven group to use, and you are planning to host the mod's
55
-
source code on GitHub, use `io.github.<Your_Username_Here>`. Set `archives_base_name`
56
-
to your mod's ID.
69
+
First you'll need to make up a name for your mod. For this tutorial, we will use the mod name `Bingus Mod`.
70
+
71
+
Based on the name, you also need a mod id. It should be composed of lowercase characters from the alphabet and underlines. Usually, you mod id should be your mod name, but with underscores instead of spaces, hyphens or other special characters. Additionally, there shouldn't be a mod already using that id. For a mod named `Bingus Mod`, it would be `bingus_mod`.
72
+
73
+
Lastly you need to decide on a maven group. It is used to identify the developer of the mod in a machine-readable scheme and is designed to be unique. It should be a domain you own in reversed. So if you own `bingus.example.com`, your maven group would be `com.example.bingus`. If you don't have a domain (or don't know what it is), but have a GitHub account, you can use `io.github.your_github_username`, replace all special characters with underscores again.
74
+
75
+
---
76
+
77
+
Now that you have decided on these things, you can update your mod's metadata:
78
+
79
+
First, update the `gradle.properties` file directly in your project folder to use your Maven group and mod ID.
80
+
81
+
Change the line beginning with `maven_group =` to use your mod maven group instead of `com.example`
82
+
Set `archives_base_name` to your mod's ID similarly and ignore all other properties for now. Here is an example how the result might look:
57
83
58
84
```gradle
59
85
# Gradle Properties
@@ -68,8 +94,9 @@ archives_base_name = bingus-mod
68
94
69
95
---
70
96
71
-
Next, update the `quilt.mod.json` file in the `src/main/resources` folder.
72
-
You'll need to update a few things under `"quilt_loader"`:
97
+
Next, update the `quilt.mod.json` file in the `src/main/resources` folder. The `quilt.mod.json` defines your mod's metadata, like mod name, author, description, website, but also more development focused metadata such as dependencies, version, mod ID and [mod initializers](../concepts/sideness#on-mod-initializers).
98
+
99
+
You'll need to update a few things under `"quilt_loader"`, see below for a finalized example:
73
100
74
101
1.`"group"` should be set to the Maven group you specified in your `gradle.properties`.
75
102
2.`"id"` should be set to your mod's ID. This should be your mod's name in all lowercase
@@ -81,10 +108,10 @@ You'll need to update a few things under `"quilt_loader"`:
81
108
3.`"contributors"` can contain entries for anything. Use your name as the key
82
109
and `"Developer"` as the value if you don't know what to put here.
83
110
4.`"contact"` can contain entries for anything similar to `""contributors"`,
84
-
but typically people put a `"homepage"`and a `"sources"` entry with a valid URL here.
111
+
but typically people put a `"homepage"`, a `"sources"`, and a `"issues"` entry with a valid URL here.
85
112
5. Replace `example_mod` with your mod's ID in `"icon"`.
86
113
4. In `"entrypoints"`, replace `com.example.example_mod` with your Maven group and mod ID,
87
-
and the `ExampleMod` at the end should be the Java class name for your mod.
114
+
and the `ExampleMod` at the end should be the Java class name for your mod. The Java class name usually is your mod's name, written in `UpperCamelCase` (So new words simply start by using a uppercase letter and the initial latter is also upper case)
88
115
For example, `io.github.bingus.bingus_mod.BingusMod`.
89
116
5. In `"mixin"`, replace `example_mod` in the file name to your mod's ID.
90
117
@@ -144,7 +171,7 @@ you when you rename the directories; just change the whole line to match your gr
144
171
145
172
Delete the `com.example` directories.
146
173
147
-
Rename `ExampleMod` to your mod's name using Java class naming conventions. Make sure the
174
+
Rename `ExampleMod` to your mod's name using Java class naming conventions. Check that the
148
175
`package` declaration at the top is correct!
149
176
150
177
In the `resources` folder, change `example_mod.mixins.json` to the file name you set in
0 commit comments