Skip to content

Commit eace2ad

Browse files
committed
Merge branch '1.19.4' into 1.20.1
2 parents e1e620a + d74420b commit eace2ad

File tree

83 files changed

+1481
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1481
-823
lines changed

.github/workflows/gradle_build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

2020
- name: Set up JDK 17
21-
uses: actions/setup-java@v3
21+
uses: actions/setup-java@v4
2222
with:
2323
java-version: '17'
2424
distribution: 'temurin'
@@ -28,16 +28,16 @@ jobs:
2828
run: chmod +x gradlew
2929

3030
- name: Build with Gradle
31-
run: ./gradlew build -Pmod_version="$(git describe --always --tags | cut -c2-)"
31+
run: ./gradlew build -Pmod_version="$(git describe --always --tags --first-parent | cut -c2-)"
3232

3333
- name: Archive Artifacts
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: Artifacts
3737
path: dist/
3838

3939
- name: Archive mapping.txt
40-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4141
with:
4242
name: Mappings
4343
path: mapping/

.github/workflows/run_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up JDK 17
16-
uses: actions/setup-java@v3
16+
uses: actions/setup-java@v4
1717
with:
1818
java-version: '17'
1919
distribution: 'temurin'

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN apt update -y
66

77
RUN apt install \
88
openjdk-17-jdk \
9+
git \
910
--assume-yes
1011

1112
COPY . /code

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.19.2-brightgreen.svg" alt="Minecraft"/></a>
1515
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.19.4-brightgreen.svg" alt="Minecraft"/></a>
1616
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.20.1-brightgreen.svg" alt="Minecraft"/></a>
17+
<a href="#Baritone"><img src="https://img.shields.io/badge/MC-1.21.3-brightgreen.svg" alt="Minecraft"/></a>
1718
</p>
1819

1920
<p align="center">
@@ -63,11 +64,14 @@ Baritone is the pathfinding system used in [Impact](https://impactclient.net/) s
6364
| [1.12.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.2.19/baritone-api-forge-1.2.19.jar) | |
6465
| [1.16.5 Forge](https://github.com/cabaletta/baritone/releases/download/v1.6.5/baritone-api-forge-1.6.5.jar) | [1.16.5 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.6.5/baritone-api-fabric-1.6.5.jar) |
6566
| [1.17.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.7.3/baritone-api-forge-1.7.3.jar) | [1.17.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.7.3/baritone-api-fabric-1.7.3.jar) |
66-
| [1.18.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.8.5/baritone-api-forge-1.8.5.jar) | [1.18.2 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.8.5/baritone-api-fabric-1.8.5.jar) |
67+
| [1.18.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.8.6/baritone-api-forge-1.8.6.jar) | [1.18.2 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.8.6/baritone-api-fabric-1.8.6.jar) |
6768
| [1.19.2 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.4/baritone-api-forge-1.9.4.jar) | [1.19.2 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.4/baritone-api-fabric-1.9.4.jar) |
6869
| [1.19.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.1/baritone-api-forge-1.9.1.jar) | [1.19.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.1/baritone-api-fabric-1.9.1.jar) |
6970
| [1.19.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-forge-1.9.3.jar) | [1.19.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.9.3/baritone-api-fabric-1.9.3.jar) |
7071
| [1.20.1 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-forge-1.10.1.jar) | [1.20.1 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.1/baritone-api-fabric-1.10.1.jar) |
72+
| [1.20.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.2/baritone-api-forge-1.10.2.jar) | [1.20.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.2/baritone-api-fabric-1.10.2.jar) |
73+
| [1.20.4 Forge](https://github.com/cabaletta/baritone/releases/download/v1.10.2/baritone-api-forge-1.10.2.jar) | [1.20.4 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.10.2/baritone-api-fabric-1.10.2.jar) |
74+
| [1.21.3 Forge](https://github.com/cabaletta/baritone/releases/download/v1.11.1/baritone-api-forge-1.11.1.jar) | [1.21.3 Fabric](https://github.com/cabaletta/baritone/releases/download/v1.11.1/baritone-api-fabric-1.11.1.jar) |
7175

7276
**Message for 2b2t players looking for 1.19/1.20 Baritone** If you like, please try the beta for Baritone Elytra for 2b2t, find it in #announcements of [the Baritone discord](http://discord.gg/s6fRBAUpmr). It supports 1.19.4 and 1.20.1, Forge or Fabric. If you have to see it to believe it, watch [this YouTube video](https://youtu.be/NnSlQi-68eQ).
7377

SETUP.md

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,87 @@
11
# Installation
22

3-
The easiest way to install Baritone is to install [Impact](https://impactclient.net/), which comes with Baritone.
4-
5-
You can also use a custom version json for Minecraft, with the [1.14.4](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1) version or the [1.15.2](https://www.dropbox.com/s/8rx6f0kts9hvd4f/1.15.2-Baritone.zip?dl=1) version or the [1.16.5](https://www.dropbox.com/s/i6f292o2i7o9acp/1.16.5-Baritone.zip?dl=1) version.
3+
The easiest way to install Baritone is to install it as Forge/Neoforge/Fabric mod, but if you know how you can also use with a custom `version.json`
4+
(Examples: [1.14.4](https://www.dropbox.com/s/rkml3hjokd3qv0m/1.14.4-Baritone.zip?dl=1), [1.15.2](https://www.dropbox.com/s/8rx6f0kts9hvd4f/1.15.2-Baritone.zip?dl=1), [1.16.5](https://www.dropbox.com/s/i6f292o2i7o9acp/1.16.5-Baritone.zip?dl=1)).
65

76
Once Baritone is installed, look [here](USAGE.md) for instructions on how to use it.
87

98
## Prebuilt official releases
10-
These releases are not always completely up to date with latest features, and are only released from `master`. (so if you want `backfill-2` branch for example, you'll have to build it yourself)
9+
Releases are made rarely and are not always up to date with the latest features and bug fixes.
1110

1211
Link to the releases page: [Releases](https://github.com/cabaletta/baritone/releases)
1312

14-
v1.2.* is for 1.12.2, v1.3.* is for 1.13.2, v1.4.* is for 1.14.4, v1.5.* is for 1.15.2, v1.6.* is for 1.16.5, v1.7.* is for 1.17.1, v1.8.* is for 1.18.1
13+
The mapping between major Minecraft versions and major Baritone versions is as follows
14+
| Minecraft version | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 |
15+
|-------------------|------|------|------|------|------|------|------|------|-------|-------|
16+
| Baritone version | v1.2 | v1.3 | v1.4 | v1.5 | v1.6 | v1.7 | v1.8 | v1.9 | v1.10 | v1.11 |
1517

1618
Any official release will be GPG signed by leijurv (44A3EA646EADAC6A). Please verify that the hash of the file you download is in `checksums.txt` and that `checksums_signed.asc` is a valid signature by that public keys of `checksums.txt`.
1719

18-
The build is fully deterministic and reproducible, and you can verify Travis did it properly by running `docker build --no-cache -t cabaletta/baritone .` yourself and comparing the shasum. This works identically on Travis, Mac, and Linux (if you have docker on Windows, I'd be grateful if you could let me know if it works there too).
20+
The build is fully deterministic and reproducible, and you can verify that by running `docker build --no-cache -t cabaletta/baritone .` yourself and comparing the shasum. This works identically on Travis, Mac, and Linux (if you have docker on Windows, I'd be grateful if you could let me know if it works there too).
1921

2022

2123
## Artifacts
2224

23-
Building Baritone will result in 5 artifacts created in the ``dist`` directory. These are the same as the artifacts created in the [releases](https://github.com/cabaletta/baritone/releases).
25+
Building Baritone will create the final artifacts in the ``dist`` directory. These are the same as the artifacts created in the [releases](https://github.com/cabaletta/baritone/releases).
2426

25-
**The Forge and Fabric releases can simply be added as a Forge/Fabric mods.**
27+
**The Forge, NeoForge and Fabric releases can simply be added as a Forge/Neoforge/Fabric mods.**
2628

27-
If another one of your Forge mods has a Baritone integration, you want `baritone-api-forge-VERSION.jar`. Otherwise, you want `baritone-standalone-forge-VERSION.jar`
29+
If another one of your other mods has a Baritone integration, you want `baritone-api-*-VERSION.jar`.
30+
If you want to report a bug and spare us some effort, you want `baritone-unoptimized-*-VERSION.jar`.
31+
Otherwise, you want `baritone-standalone-*-VERSION.jar`
2832

33+
Here's what the various qualifiers mean
2934
- **API**: Only the non-api packages are obfuscated. This should be used in environments where other mods would like to use Baritone's features.
30-
- **Forge/Fabric API**: Same as API, but packaged for Forge/Fabric. This should be used where another mod has a Baritone integration.
31-
- **Standalone**: Everything is obfuscated. This should be used in environments where there are no other mods present that would like to use Baritone's features.
32-
- **Forge/Fabric Standalone**: Same as Standalone, but packaged for Forge/Fabric. This should be used when Baritone is your only Forge/Fabric mod, or none of your other Forge/Fabric mods integrate with Baritone.
33-
- **Unoptimized**: Nothing is obfuscated. This shouldn't be used ever in production.
34-
- **Forge/Fabric Unoptimized**: Same as Unoptimized, but packaged for Forge/Fabric.
35+
- **Standalone**: Everything is obfuscated. Other mods cannot use Baritone, but you get a bit of extra performance.
36+
- **Unoptimized**: Nothing is obfuscated. This shouldn't be used in production, but is really helpful for crash reports.
37+
38+
- **No loader**: Loadable as a launchwrapper tweaker against vanilla Minecraft using a custom `version.json`.
39+
- **Forge/Neoforge/Fabric**: Loadable as a standard mod using the respective loader. The fabric build may or may not work on Quilt.
40+
41+
If you build from source you will also find mapping files in the `dist` directory. These contain the renamings done by ProGuard and are useful if you want to read obfuscated stack traces.
3542

3643
## Build it yourself
3744
- Clone or download Baritone
3845

3946
![Image](https://i.imgur.com/kbqBtoN.png)
40-
- If you choose to download, make sure you extract the ZIP archive.
47+
- If you choose to download, make sure you download the correct branch and extract the ZIP archive.
4148
- Follow one of the instruction sets below, based on your preference
4249

4350
## Command Line
4451
On Mac OSX and Linux, use `./gradlew` instead of `gradlew`.
4552

46-
If you have errors with a package missing please make sure you have setup your environment, and are using Oracle JDK 8 for 1.12.2-1.16.5, JDK 16+ for 1.17.1, and JDK 17+ for 1.18.1.
47-
48-
To check which java you are using do
49-
`java -version` in a command prompt or terminal.
50-
If you are using anything above OpenJDK 8 for 1.12.2-1.16.5, it might not work because the Java distributions above JDK 8 using may not have the needed javax classes.
53+
The recommended Java versions by Minecraft version are
54+
| Minecraft version | Java version |
55+
|-------------------------------|---------------|
56+
| 1.12.2 - 1.16.5 | 8 |
57+
| 1.17.1 | 16 |
58+
| 1.18.2 - 1.20.4 | 17 |
59+
| 1.20.5 - 1.21.4 | 21 |
5160

5261
Download java: https://adoptium.net/
53-
#### macOS guide
54-
In order to get JDK 8, Try running the following command:
55-
`% /usr/libexec/java_home -V`
56-
If it doesn't work try this guide: https://stackoverflow.com/questions/46513639/how-to-downgrade-java-from-9-to-8-on-a-macos-eclipse-is-not-running-with-java-9
57-
58-
If you see something like
59-
60-
`% 1.8.0_VERSION, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_VERSION.jdk/Contents/Home`
6162

62-
in the list then you've got JDK 8 installed.
63-
In order to get JDK 8 running in the **current terminal window** you will have to run this command:
64-
65-
`% export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)`
66-
67-
To add OpenJDK 8 to your PATH add the export line to the end of your `.zshrc / .bashrc` if you want it to apply to each new terminal. If you're using bash change the .bachrc and if you're using zsh change the .zshrc
63+
To check which java version you are using do `java -version` in a command prompt or terminal.
6864

6965
### Building Baritone
7066

7167
These tasks depend on the minecraft version, but are (for the most part) standard for building mods.
7268

73-
for more details, see [the build ci action](/.github/workflows/gradle_build.yml)
69+
For more details, see [the build ci action](/.github/workflows/gradle_build.yml) of the branch you want to build.
70+
71+
For most branches `gradlew build` should build everything, but there are exceptions and this file might be out of date.
72+
73+
More specifically, on older branches the setup used to be that `gradlew build` builds the tweaker jar
74+
and `gradlew build -Pbaritone.forge_build` / `gradlew build -Pbaritone.fabric_build` are needed to build
75+
for Forge/Fabric instead. And you might have to run `setupDecompWorkspace` first.
7476

7577
## IntelliJ
7678
- Open the project in IntelliJ as a Gradle project
7779
- Refresh the Gradle project (or, to be safe, just restart IntelliJ)
78-
- depending on the minecraft version, you may need to run `setupDecompWorkspace` or `genIntellijRuns` in order to get everything working
80+
- Depending on the minecraft version, you may need to run `setupDecompWorkspace` or `genIntellijRuns` in order to get everything working
81+
82+
## Github Actions
83+
Most branches have a CI workflow at `.github/workflows/gradle_build.yml`. If you fork this repository and enable actions for your fork
84+
you can push a dummy commit to trigger it and have GitHub build Baritone for you.
85+
86+
If the commit you want to build is less than 90 days old, you can also find the corresponding workflow run in
87+
[this list](https://github.com/cabaletta/baritone/actions/workflows/gradle_build.yml) and download the artifacts from there.

build.gradle

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,29 @@ allprojects {
2121
apply plugin: "maven-publish"
2222

2323
archivesBaseName = rootProject.archives_base_name
24-
def vers = 'git describe --always --tags --dirty'.execute().text.trim()
24+
25+
def vers = ""
26+
try {
27+
vers = 'git describe --always --tags --first-parent --dirty'.execute().text.trim()
28+
} catch (Exception e) {
29+
println "Version detection failed: " + e
30+
}
2531
if (!vers.startsWith("v")) {
26-
println "git doesn't appear to be installed!"
2732
println "using version number: " + rootProject.mod_version
2833
version = rootProject.mod_version
2934
} else {
3035
version = vers.substring(1)
36+
println "Detected version " + version
3137
}
3238
group = rootProject.maven_group
3339

34-
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
40+
sourceCompatibility = targetCompatibility = JavaVersion.toVersion(project.java_version)
41+
42+
java {
43+
toolchain {
44+
languageVersion.set(JavaLanguageVersion.of(sourceCompatibility.majorVersion.toInteger()))
45+
}
46+
}
3547

3648
repositories {
3749
maven {
@@ -66,32 +78,35 @@ allprojects {
6678
}
6779

6880
dependencies {
69-
minecraft "net.minecraft:minecraft:${rootProject.minecraft_version}"
70-
// The following line declares the mojmap mappings, you may use other mappings as well
71-
mappings "net.fabricmc:intermediary:${rootProject.minecraft_version}:v2"
72-
mappings "net.minecraft:minecraft:${rootProject.minecraft_version}:client-mappings"
73-
mappings "org.parchmentmc.data:parchment-1.19.2:2022.11.27@zip"
74-
75-
implementation "org.spongepowered:mixin:0.8.5"
76-
implementation "org.ow2.asm:asm:9.3"
77-
// The following line declares the yarn mappings you may select this one as well.
78-
// mappings "net.fabricmc:yarn:1.17.1+build.32:v2"
79-
//launchImplementation('dev.babbaj:nether-pathfinder:1.3.0')
80-
implementation 'dev.babbaj:nether-pathfinder:1.4.1'
81+
compileOnly "org.spongepowered:mixin:${project.mixin_version}"
82+
compileOnly "org.ow2.asm:asm:${project.asm_version}"
83+
84+
implementation "dev.babbaj:nether-pathfinder:${project.nether_pathfinder_version}"
85+
}
86+
87+
unimined.minecraft(sourceSets.main, true) {
88+
version rootProject.minecraft_version
89+
90+
mappings {
91+
intermediary()
92+
mojmap()
93+
parchment("2023.06.26")
94+
}
8195
}
8296

8397
tasks.withType(JavaCompile).configureEach {
8498
it.options.encoding = "UTF-8"
8599

86-
def targetVersion = 17
100+
def targetVersion = project.java_version.toInteger()
87101
if (JavaVersion.current().isJava9Compatible()) {
88102
it.options.release = targetVersion
89103
}
90104
}
91105
}
92106

93-
minecraft {
107+
unimined.minecraft {
94108
runs.off = true
109+
defaultRemapJar = false
95110
}
96111

97112
archivesBaseName = archivesBaseName + "-common"
@@ -131,10 +146,6 @@ jar {
131146
from sourceSets.main.output, sourceSets.launch.output, sourceSets.api.output
132147
}
133148

134-
remapJar {
135-
target = "mojmap"
136-
}
137-
138149
javadoc {
139150
options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error
140151
options.linkSource true

buildSrc/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@ repositories {
2929
name = 'FabricMaven'
3030
url = 'https://maven.fabricmc.net/'
3131
}
32+
maven {
33+
name = 'NeoForgedMaven'
34+
url = 'https://maven.neoforged.net/'
35+
}
3236
mavenCentral()
3337
}
3438

3539
dependencies {
3640
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
37-
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
41+
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
3842

39-
implementation group: 'xyz.wagyourtail.unimined', name: 'xyz.wagyourtail.unimined.gradle.plugin', version: '0.4.10'
43+
implementation group: 'xyz.wagyourtail.unimined', name: 'xyz.wagyourtail.unimined.gradle.plugin', version: '1.0.5'
4044
}

buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
class BaritoneGradleTask extends DefaultTask {
3737

3838
protected static final String
39-
PROGUARD_ZIP = "proguard.zip",
40-
PROGUARD_JAR = "proguard.jar",
39+
PROGUARD_ZIP = "proguard-%s.zip",
40+
PROGUARD_JAR = "proguard-%s.jar",
4141
PROGUARD_CONFIG_TEMPLATE = "scripts/proguard.pro",
4242
PROGUARD_CONFIG_DEST = "template.pro",
4343
PROGUARD_API_CONFIG = "api.pro",

0 commit comments

Comments
 (0)