Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -31,13 +31,13 @@ jobs:
run: ./gradlew build -Pmod_version="$(git describe --always --tags --first-parent | cut -c2-)"

- name: Archive Artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Artifacts
path: dist/

- name: Archive mapping.txt
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Mappings
path: mapping/
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
Expand Down
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ allprojects {
apply plugin: "xyz.wagyourtail.unimined"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name
base {
archivesName = rootProject.archives_base_name
}

def vers = ""
try {
Expand All @@ -36,10 +38,9 @@ allprojects {
println "Detected version " + version
}
group = rootProject.maven_group

sourceCompatibility = targetCompatibility = JavaVersion.toVersion(project.java_version)

java {
sourceCompatibility = JavaVersion.toVersion(project.java_version)
toolchain {
languageVersion.set(JavaLanguageVersion.of(sourceCompatibility.majorVersion.toInteger()))
}
Expand Down Expand Up @@ -109,7 +110,9 @@ unimined.minecraft {
defaultRemapJar = false
}

archivesBaseName = archivesBaseName + "-common"
base {
archivesName = archivesName.get() + "-common"
}

sourceSets {
api {
Expand Down
9 changes: 5 additions & 4 deletions buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package baritone.gradle.task;

import baritone.gradle.util.Determinizer;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.SourceSetContainer;
import org.gradle.api.tasks.TaskAction;
Expand All @@ -33,7 +33,7 @@
import xyz.wagyourtail.unimined.api.minecraft.MinecraftConfig;

import java.io.*;
import java.net.URL;
import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
Expand Down Expand Up @@ -97,7 +97,8 @@ private void processArtifact() throws Exception {
private void downloadProguard() throws Exception {
Path proguardZip = getTemporaryFile(String.format(PROGUARD_ZIP, proguardVersion));
if (!Files.exists(proguardZip)) {
write(new URL(String.format("https://github.com/Guardsquare/proguard/releases/download/v%s/proguard-%s.zip", proguardVersion, proguardVersion)).openStream(), proguardZip);
String downloadAddress = String.format("https://github.com/Guardsquare/proguard/releases/download/v%s/proguard-%s.zip", proguardVersion, proguardVersion);
write(new URI(downloadAddress).toURL().openStream(), proguardZip);
}
}

Expand Down Expand Up @@ -175,7 +176,7 @@ private void generateConfigs() throws Exception {
}

private Stream<File> acquireDependencies() {
return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("main").getCompileClasspath().getFiles()
return getProject().getExtensions().getByType(JavaPluginExtension.class).getSourceSets().findByName("main").getCompileClasspath().getFiles()
.stream()
.filter(File::isFile);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void determinize(String inputPath, String outputPath, List<File> t
clone.setTime(42069);
jos.putNextEntry(clone);
if (entry.getName().endsWith(".refmap.json")) {
JsonElement json = new JsonParser().parse(new InputStreamReader(jarFile.getInputStream(entry)));
JsonElement json = JsonParser.parseReader(new InputStreamReader(jarFile.getInputStream(entry)));
jos.write(writeSorted(json).getBytes());
} else if (entry.getName().equals("META-INF/MANIFEST.MF") && doForgeReplacementOfMetaInf) { // only replace for forge jar
ByteArrayOutputStream cancer = new ByteArrayOutputStream();
Expand Down
6 changes: 4 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask

plugins {
id "com.github.johnrengelman.shadow" version "8.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
}

archivesBaseName = archivesBaseName + "-fabric"
base {
archivesName = archivesName.get() + "-fabric"
}

unimined.minecraft {
fabric {
Expand Down
6 changes: 4 additions & 2 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ import baritone.gradle.task.CreateDistTask
import baritone.gradle.task.ProguardTask

plugins {
id "com.github.johnrengelman.shadow" version "8.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
}

archivesBaseName = archivesBaseName + "-forge"
base {
archivesName = archivesName.get() + "-forge"
}

unimined.minecraft {
mappings {
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/baritone/api/command/datatypes/ItemById.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Item get(IDatatypeContext ctx) throws CommandException {
public Stream<String> tabComplete(IDatatypeContext ctx) throws CommandException {
return new TabCompleteHelper()
.append(
BuiltInRegistries.BLOCK.keySet()
BuiltInRegistries.ITEM.keySet()
.stream()
.map(ResourceLocation::toString)
)
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/baritone/command/defaults/PathCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public PathCommand(IBaritone baritone) {
public void execute(String label, IArgConsumer args) throws CommandException {
ICustomGoalProcess customGoalProcess = baritone.getCustomGoalProcess();
args.requireMax(0);
if (customGoalProcess.getGoal() == null) {
logDirect("No goal set");
return;
}
BaritoneAPI.getProvider().getWorldScanner().repack(ctx);
customGoalProcess.path();
logDirect("Now pathing");
Expand Down
2 changes: 1 addition & 1 deletion tweaker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import baritone.gradle.task.ProguardTask
//import baritone.gradle.task.TweakerJsonAssembler

plugins {
id "com.github.johnrengelman.shadow" version "8.0.0"
id "com.github.johnrengelman.shadow" version "8.1.1"
}

unimined.minecraft {
Expand Down