Skip to content

Commit 1abf076

Browse files
authored
Update disco and add setup information to README (#28)
2 parents b862fa3 + 0658742 commit 1abf076

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
This mod uses the preprocessor [Discombobulator](https://github.com/MinecraftTAS/Discombobulator),
2+
which allows us to have one codebase for multiple Minecraft versions.
3+
4+
### 1. Clone this repository into your workspace
5+
```sh
6+
git clone https://github.com/MinecraftTAS/LoTAS-Light.git
7+
```
8+
### 2. Go into the project
9+
```sh
10+
cd LoTAS-Light/
11+
```
12+
### 3. Setup sub projects
13+
Run
14+
```sh
15+
./gradlew preprocessBase
16+
```
17+
This will copy the files from `LoTAS-Light/src/...` into `LoTAS-Light/1.20.4/src`, `LoTAS-Light/1.20.6/src`, etc...
18+
19+
And code between comments like
20+
```java
21+
// # 1.20.6
22+
//$$ LoTASLight.savestateHandler
23+
// # 1.20.4
24+
LoTASLight.savestateHandler=null;
25+
// # end
26+
```
27+
will be enabled or disabled accordingly between each version
28+
### 4. Import root project into your IDE
29+
#### IntelliJ
30+
You only need to open the build.gradle file in LoTAS-Light (not in sub projects like 1.20.4, those will be automatically imported!) and it should recognize it as a gradle project
31+
#### Eclipse
32+
1. Set your workspace folder to the parent folder of the LoTAS-Light folder, so if you have something like `workspace/LoTAS-Light`, set the workspace folder to "workspace".
33+
2. Click `File>Import` then search for "Existing Gradle project" and click next
34+
3. Select the "LoTAS-Light" folder as a project root directory then click next
35+
4. (optional) In this step you can set up a specific JDK and gradle version if you haven't set that up yet, but currently this project needs JDK 23 and a Gradle version greater than 8.12.1.
36+
5. Then click finish and wait for it to set up
37+
38+
### 5. Decompile source and download assets
39+
You have to run the gradle task `genSources`. You can do that from within your IDE or run `./gradlew genSources` in the console. This will decompile all Minecraft versions
40+
41+
#### Eclipse
42+
Additionally you need to run the task `eclipse` as well, which will generate .launch configs in each subproject which you can use to start Minecraft from withing your IDE
43+
44+
## Building
45+
After you have set up and preprocessed the versions, you can run either `./gradlew :1.21.4:build` to build only one version (built jar can be found in `LoTAS-Light/1.21.4/build/libs`), or run the task `collectBuilds`. This will build all versions and collect all versions in `LoTAS-Light/build`
46+
47+
For more information on how to work with Discombobulator, check the [Wiki](https://github.com/MinecraftTAS/Discombobulator/wiki) or ask us on [Discord](https://discord.gg/jGhNxpd)

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ Help translate this mod with [Weblate](https://weblate.minecrafttas.com/projects
3434
- ScribbleTAS
3535
- Polish
3636
- 4NTJ
37-
- NULLderef
37+
- NULLderef
38+
39+
## Setup
40+
To set up this mod in your IDE, check [CONTRIBUTING.md](https://github.com/MinecraftTAS/LoTAS-Light/blob/develop/CONTRIBUTING.md)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ loader_version=0.16.10
55
loom_version=1.10-SNAPSHOT
66

77
# preprocessor
8-
discombobulator_version=1.3-SNAPSHOT
8+
discombobulator_version=1.3
99

1010
# mod
1111
mod_name=LoTAS-Light

settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ pluginManagement {
55
maven {
66
url = "https://maven.minecrafttas.com/main"
77
}
8-
maven {
9-
url = "https://maven.minecrafttas.com/snapshots"
10-
}
8+
// maven {
9+
// url = "https://maven.minecrafttas.com/snapshots"
10+
// }
1111
maven {
1212
name = 'Fabric'
1313
url = 'https://maven.fabricmc.net/'

0 commit comments

Comments
 (0)