diff --git a/.gitignore b/.gitignore index 0182f9989..99c56ad4f 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ baritone_Client.launch !/.idea/copyright/profiles_settings.xml .vscode/launch.json +.architectury-transformer \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0de75c0c5..c1c104105 100755 --- a/build.gradle +++ b/build.gradle @@ -16,175 +16,59 @@ */ plugins { - id 'java' - id 'dev.architectury.loom' version '0.10.0-SNAPSHOT' - id 'maven-publish' + id "architectury-plugin" version "3.4-SNAPSHOT" + id 'dev.architectury.loom' version '0.11.0-SNAPSHOT' apply false } - -archivesBaseName = project.archives_base_name -version = project.mod_version -group = project.maven_group - -import baritone.gradle.task.CreateDistTask -import baritone.gradle.task.ProguardTask - -def compileType = project.hasProperty("baritone.fabric_build") ? "FABRIC" : project.hasProperty("baritone.forge_build") ? "FORGE" : "OFFICIAL" - -sourceCompatibility = targetCompatibility = JavaVersion.VERSION_16 - -compileJava { - options.encoding = "UTF-8" // allow emoji in comments :^) +architectury { + minecraft = rootProject.minecraft_version } -sourceSets { - api { - compileClasspath += main.compileClasspath - } - main { - compileClasspath += api.output - } - test { - compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output - runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output - } - launch { - compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output - runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output - } - schematica_api { - compileClasspath += main.compileClasspath - } - main { - compileClasspath += schematica_api.output - } -} +subprojects { + apply plugin: 'java' + apply plugin: "maven-publish" + apply plugin: "dev.architectury.loom" -loom { - if (compileType.equals("FORGE")) { - forge { - mixinConfig 'mixins.baritone.json' - } - } - mixin.defaultRefmapName = "mixins.baritone.refmap.json" + archivesBaseName = rootProject.archives_base_name + version = rootProject.mod_version + group = rootProject.maven_group - runs { - client { - source = sourceSets.launch + sourceCompatibility = targetCompatibility = JavaVersion.VERSION_16 + + loom { + silentMojangMappingsLicense() + } + + dependencies { + minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" + // The following line declares the mojmap mappings, you may use other mappings as well + mappings loom.officialMojangMappings() + // The following line declares the yarn mappings you may select this one as well. + // mappings "net.fabricmc:yarn:1.17.1+build.32:v2" + } + + tasks.withType(JavaCompile).configureEach { + it.options.encoding = "UTF-8" + + def targetVersion = 16 + if (JavaVersion.current().isJava9Compatible()) { + it.options.release = targetVersion } } } +allprojects { + apply plugin: "architectury-plugin" -repositories { - maven { - name = 'impactdevelopment-repo' - url = 'https://impactdevelopment.github.io/maven/' - } - maven { - name = "ldtteam" - url = "https://maven.parchmentmc.net/" - } - mavenCentral() -} - -dependencies { - if (compileType.equals("FORGE")) { - forge "net.minecraftforge:forge:${project.forge_version}" - } - mappings loom.layered() { - officialMojangMappings() - //technically optional, but really helpful in dev: - parchment("org.parchmentmc.data:parchment-1.17.1:2021.10.24@zip" as String) - } - minecraft "com.mojang:minecraft:${project.minecraft_version}" - if (!compileType.equals("FORGE")) { - modImplementation "net.fabricmc:fabric-loader:${project.fabric_version}" - } - // this makes it compile with the forge tweak stuff - implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2' - implementation('net.minecraft:launchwrapper:1.12') { - exclude module: 'lwjgl' - exclude module: 'asm-debug-all' - } - - implementation 'com.google.code.findbugs:jsr305:3.0.2' - - testImplementation 'junit:junit:4.12' -} - -javadoc { - options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error - options.linkSource true - options.encoding "UTF-8" // allow emoji in comments :^) - source = sourceSets.api.allJava - classpath += sourceSets.api.compileClasspath -} - -// skidded from fabric-example-mod (comments and all) -tasks.withType(JavaCompile).configureEach { - // ensure that the encoding is set to UTF-8, no matter what the system default is - // this fixes some edge cases with special characters not displaying correctly - // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html - // If Javadoc is generated, this must be specified in that task too. - it.options.encoding = "UTF-8" - - // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too - // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. - // We'll use that if it's available, but otherwise we'll use the older option. - def targetVersion = 16 - if (JavaVersion.current().isJava9Compatible()) { - it.options.release = targetVersion - } -} - - -jar { - from sourceSets.launch.output, sourceSets.api.output - - if (!getProject().hasProperty("baritone.forge_build")) { - exclude "**/BaritoneForgeModXD.class" - exclude "**/mods.toml" - } - - preserveFileTimestamps = false - reproducibleFileOrder = true - - if (getProject().hasProperty("baritone.fabric_build")) { - filesMatching("fabric.mod.json") { - expand "version": version + repositories { + maven { + name = 'impactdevelopment-repo' + url = 'https://impactdevelopment.github.io/maven/' } - } else { - exclude("fabric.mod.json") - } - - - manifest { - attributes( - 'MixinConfigs': 'mixins.baritone.json', - "MixinConnector": "baritone.launch.BaritoneMixinConnector", - - 'Implementation-Title': 'Baritone', - 'Implementation-Version': version, - ) + maven { + name = "ldtteam" + url = "https://maven.parchmentmc.net/" + } + mavenCentral() } } - -if (compileType.equals("OFFICIAL")) { - remapJar { - toM.set "official" - } -} - - - -task proguard(type: ProguardTask) { - url 'https://downloads.sourceforge.net/project/proguard/v7.1.0-beta5/proguard-7.1.0-beta5.zip' - extract 'proguard-7.1.0-beta5/lib/proguard.jar' - compType compileType -} - -task createDist(type: CreateDistTask, dependsOn: proguard) - - -build.finalizedBy(createDist) \ No newline at end of file diff --git a/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java b/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java index b85717201..cf5aed94d 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java @@ -18,6 +18,7 @@ package baritone.gradle.task; import org.gradle.api.DefaultTask; +import org.gradle.api.tasks.Input; import java.io.File; import java.io.IOException; @@ -59,7 +60,7 @@ class BaritoneGradleTask extends DefaultTask { proguardOut; public BaritoneGradleTask() { - this.artifactName = getProject().getName(); + this.artifactName = getProject().getProperties().get("archivesBaseName").toString(); this.artifactVersion = getProject().getVersion().toString(); this.artifactPath = this.getBuildFile(formatVersion(ARTIFACT_STANDARD)); @@ -102,6 +103,10 @@ class BaritoneGradleTask extends DefaultTask { return Paths.get(new File(new File(getProject().getBuildDir(), "../"), file).getAbsolutePath()); } + protected Path getRootRelativeFile(String file) { + return Paths.get(new File(new File(getProject().getRootProject().getBuildDir(), "../"), file).getAbsolutePath()); + } + protected Path getTemporaryFile(String file) { return Paths.get(new File(getTemporaryDir(), file).getAbsolutePath()); } diff --git a/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java b/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java index e55e84acd..ca06dd6f8 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/CreateDistTask.java @@ -42,12 +42,12 @@ public class CreateDistTask extends BaritoneGradleTask { super.verifyArtifacts(); // Define the distribution file paths - Path api = getRelativeFile("dist/" + getFileName(artifactApiPath)); - Path standalone = getRelativeFile("dist/" + getFileName(artifactStandalonePath)); - Path unoptimized = getRelativeFile("dist/" + getFileName(artifactUnoptimizedPath)); + Path api = getRootRelativeFile("dist/" + getFileName(artifactApiPath)); + Path standalone = getRootRelativeFile("dist/" + getFileName(artifactStandalonePath)); + Path unoptimized = getRootRelativeFile("dist/" + getFileName(artifactUnoptimizedPath)); // NIO will not automatically create directories - Path dir = getRelativeFile("dist/"); + Path dir = getRootRelativeFile("dist/"); if (!Files.exists(dir)) { Files.createDirectory(dir); } @@ -67,7 +67,7 @@ public class CreateDistTask extends BaritoneGradleTask { shasum.forEach(System.out::println); // Write the checksums to a file - Files.write(getRelativeFile("dist/checksums.txt"), shasum); + Files.write(getRootRelativeFile("dist/checksums.txt"), shasum); } private static String getFileName(Path p) { @@ -76,15 +76,15 @@ public class CreateDistTask extends BaritoneGradleTask { private List getAllDistJars() { return Arrays.asList( - getRelativeFile("dist/" + formatVersion(ARTIFACT_API)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_API)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_API)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_STANDALONE)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_STANDALONE)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_STANDALONE)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_UNOPTIMIZED)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_UNOPTIMIZED)), - getRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_UNOPTIMIZED)) + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_API)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_API)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_API)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_STANDALONE)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_STANDALONE)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_STANDALONE)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_UNOPTIMIZED)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FABRIC_UNOPTIMIZED)), + getRootRelativeFile("dist/" + formatVersion(ARTIFACT_FORGE_UNOPTIMIZED)) ); } diff --git a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java index aa5e36be0..4807a6a69 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java @@ -86,11 +86,11 @@ public class ProguardTask extends BaritoneGradleTask { } private boolean isMcJar(File f) { - return f.getName().startsWith(compType.equals("FORGE") ? "forge-" : "minecraft-") && f.getName().contains("minecraft-mapped"); + return f.getName().startsWith(compType.equals("FORGE") ? "forge-" : "minecraft-") && f.getName().contains("minecraft-merged-named"); } private void copyMcJar() throws IOException { - File mcClientJar = this.getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles() + File mcClientJar = this.getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("main").getRuntimeClasspath().getFiles() .stream() .filter(this::isMcJar) .map(f -> { @@ -98,9 +98,9 @@ public class ProguardTask extends BaritoneGradleTask { case "OFFICIAL": return new File(f.getParentFile().getParentFile(), "minecraft-merged.jar"); case "FABRIC": - return new File(f.getParentFile(), "minecraft-intermediary.jar"); + return new File(f.getParentFile().getParentFile(), "minecraft-merged-intermediary.jar"); case "FORGE": - return new File(f.getParentFile(), "minecraft-srg.jar"); + return new File(f.getParentFile().getParentFile(), f.getName().replace("-named.jar", "-srg.jar")); } return null; }) @@ -233,7 +233,7 @@ public class ProguardTask extends BaritoneGradleTask { } private void generateConfigs() throws Exception { - Files.copy(getRelativeFile(PROGUARD_CONFIG_TEMPLATE), getTemporaryFile(PROGUARD_CONFIG_DEST), REPLACE_EXISTING); + Files.copy(getRootRelativeFile(PROGUARD_CONFIG_TEMPLATE), getTemporaryFile(PROGUARD_CONFIG_DEST), REPLACE_EXISTING); // Setup the template that will be used to derive the API and Standalone configs List template = Files.readAllLines(getTemporaryFile(PROGUARD_CONFIG_DEST)); @@ -268,12 +268,8 @@ public class ProguardTask extends BaritoneGradleTask { Files.write(getTemporaryFile(PROGUARD_STANDALONE_CONFIG), standalone); } - private File getSrgMcJar() { - return getProject().getTasks().findByName("copyMcJar").getOutputs().getFiles().getSingleFile(); - } - private Stream acquireDependencies() { - return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("launch").getRuntimeClasspath().getFiles() + return getProject().getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().findByName("main").getRuntimeClasspath().getFiles() .stream() .filter(File::isFile); } diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 000000000..4007d358d --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,129 @@ +import baritone.gradle.task.CreateDistTask +import baritone.gradle.task.ProguardTask + +architectury { + injectInjectables = false + common() +} + +sourceSets { + api { + compileClasspath += main.compileClasspath + java { + java { + srcDir "$rootDir/src/api/java" + } + resources { + srcDir "$rootDir/src/api/resources" + } + } + } + main { + compileClasspath += api.output + java { + java { + srcDir "$rootDir/src/main/java" + } + resources { + srcDir "$rootDir/src/main/resources" + } + } + } + test { + compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output + runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output + java { + java { + srcDir "$rootDir/src/test/java" + } + resources { + srcDir "$rootDir/src/test/resources" + } + } + } + launch { + compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output + runtimeClasspath += main.compileClasspath + main.runtimeClasspath + main.output + java { + java { + srcDir "$rootDir/src/launch/java" + } + resources { + srcDir "$rootDir/src/launch/resources" + } + } + } + schematica_api { + compileClasspath += main.compileClasspath + java { + java { + srcDir "$rootDir/src/schematica_api/java" + } + resources { + srcDir "$rootDir/src/schematica_api/resources" + } + } + } + main { + compileClasspath += schematica_api.output + } +} + +dependencies { + // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies + // Do NOT use other classes from fabric loader + modImplementation "net.fabricmc:fabric-loader:${project.fabric_version}" + + // this makes it compile with the forge tweak stuff + implementation 'com.github.ImpactDevelopment:SimpleTweaker:1.2' + implementation('net.minecraft:launchwrapper:1.12') { + exclude module: 'lwjgl' + exclude module: 'asm-debug-all' + } + + implementation 'com.google.code.findbugs:jsr305:3.0.2' + + testImplementation 'junit:junit:4.12' +} + +javadoc { + options.addStringOption('Xwerror', '-quiet') // makes the build fail on travis when there is a javadoc error + options.linkSource true + options.encoding "UTF-8" // allow emoji in comments :^) + source = sourceSets.api.allJava + classpath += sourceSets.api.compileClasspath +} + +jar { + classifier "dev" + from sourceSets.launch.output, sourceSets.api.output + + + preserveFileTimestamps = false + reproducibleFileOrder = true + + manifest { + attributes( + 'MixinConfigs': 'mixins.baritone.json', + "MixinConnector": "baritone.launch.BaritoneMixinConnector", + + 'Implementation-Title': 'Baritone', + 'Implementation-Version': version, + ) + } +} + +remapJar { + targetNamespace.set "official" +} + + +task proguard(type: ProguardTask) { + url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.1/proguard-7.2.1.zip' + extract 'proguard-7.2.1/lib/proguard.jar' + compType "OFFICIAL" +} + +task createDist(type: CreateDistTask, dependsOn: proguard) + +build.finalizedBy(createDist) \ No newline at end of file diff --git a/common/logs/latest.log b/common/logs/latest.log new file mode 100644 index 000000000..e69de29bb diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 000000000..65f9f6037 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,83 @@ +/* + * This file is part of Baritone. + * + * Baritone is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Baritone is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Baritone. If not, see . + */ + +import baritone.gradle.task.CreateDistTask +import baritone.gradle.task.ProguardTask + +plugins { + id "com.github.johnrengelman.shadow" version "7.0.0" +} + +archivesBaseName = archivesBaseName + "-" + project.name + +architectury { + platformSetupLoomIde() + fabric() +} + +configurations { + common + shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentFabric.extendsFrom common +} + +dependencies { + + common(project(path: ":common", configuration: "namedElements")) { transitive false } + shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +shadowJar { + configurations = [project.configurations.shadowCommon] + classifier "dev-shadow" +} + +remapJar { + input.set shadowJar.archiveFile + dependsOn shadowJar + classifier null +} + +jar { + classifier "dev" +} + +components.java { + withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { + skip() + } +} + +task proguard(type: ProguardTask) { + url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.1/proguard-7.2.1.zip' + extract 'proguard-7.2.1/lib/proguard.jar' + compType "FABRIC" +} + +task createDist(type: CreateDistTask, dependsOn: proguard) + +build.finalizedBy(createDist) \ No newline at end of file diff --git a/forge/build.gradle b/forge/build.gradle new file mode 100644 index 000000000..08ae62e00 --- /dev/null +++ b/forge/build.gradle @@ -0,0 +1,103 @@ +/* + * This file is part of Baritone. + * + * Baritone is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Baritone is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Baritone. If not, see . + */ + +import baritone.gradle.task.CreateDistTask +import baritone.gradle.task.ProguardTask + +plugins { + id "com.github.johnrengelman.shadow" version "7.0.0" +} + +archivesBaseName = archivesBaseName + "-" + project.name + +architectury { + platformSetupLoomIde() + forge() +} + +loom { + forge { + mixinConfig 'mixins.baritone.json' + } +} + +configurations { + common + shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentFabric.extendsFrom common +} + +dependencies { + forge "net.minecraftforge:forge:${rootProject.forge_version}" + + common(project(path: ":common", configuration: "namedElements")) { transitive false } + shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false } +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +shadowJar { + exclude("fabric.mod.json") + + configurations = [project.configurations.shadowCommon] + classifier "dev-shadow" +} + +remapJar { + input.set shadowJar.archiveFile + dependsOn shadowJar + classifier null +} + +jar { + classifier "dev" + + manifest { + attributes( + 'MixinConfigs': 'mixins.baritone.json', + "MixinConnector": "baritone.launch.BaritoneMixinConnector", + + 'Implementation-Title': 'Baritone', + 'Implementation-Version': version, + ) + } +} + +components.java { + withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { + skip() + } +} + +task proguard(type: ProguardTask) { + url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.1/proguard-7.2.1.zip' + extract 'proguard-7.2.1/lib/proguard.jar' + compType "FORGE" +} + +task createDist(type: CreateDistTask, dependsOn: proguard) + + +build.finalizedBy(createDist) \ No newline at end of file diff --git a/forge/gradle.properties b/forge/gradle.properties new file mode 100644 index 000000000..24befc474 --- /dev/null +++ b/forge/gradle.properties @@ -0,0 +1,18 @@ +# +# This file is part of Baritone. +# +# Baritone is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Baritone is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with Baritone. If not, see . +# + +loom.platform=forge \ No newline at end of file diff --git a/forge/src/main/java/baritone/BaritoeModXD.java b/forge/src/main/java/baritone/BaritoeModXD.java new file mode 100644 index 000000000..166ee5e26 --- /dev/null +++ b/forge/src/main/java/baritone/BaritoeModXD.java @@ -0,0 +1,22 @@ +/* + * This file is part of Baritone. + * + * Baritone is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Baritone is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Baritone. If not, see . + */ + +package baritone;import net.minecraftforge.fml.common.Mod; + +@Mod("baritoe") +public class BaritoeModXD { +} diff --git a/src/launch/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml similarity index 100% rename from src/launch/resources/META-INF/mods.toml rename to forge/src/main/resources/META-INF/mods.toml diff --git a/settings.gradle b/settings.gradle index 8917ae757..15a6e8e89 100755 --- a/settings.gradle +++ b/settings.gradle @@ -36,7 +36,12 @@ pluginManagement { url = 'https://libraries.minecraft.net/' } mavenCentral() + gradlePluginPortal() } } rootProject.name = 'baritone' + +include("fabric") +include("forge") +include("common") diff --git a/src/launch/resources/baritone/launch/BaritoneForgeModXD.class b/src/launch/resources/baritone/launch/BaritoneForgeModXD.class deleted file mode 100644 index cfb3137e2..000000000 Binary files a/src/launch/resources/baritone/launch/BaritoneForgeModXD.class and /dev/null differ diff --git a/src/launch/resources/fabric.mod.json b/src/launch/resources/fabric.mod.json index a1bed3a99..a66061bf3 100644 --- a/src/launch/resources/fabric.mod.json +++ b/src/launch/resources/fabric.mod.json @@ -21,7 +21,7 @@ "entrypoints": { }, "mixins": [ - "mixins.baritone.json" + "mixins.baritone.json" ], "depends": { diff --git a/src/launch/resources/mixins.baritone.json b/src/launch/resources/mixins.baritone.json index befa220ff..c8992290f 100644 --- a/src/launch/resources/mixins.baritone.json +++ b/src/launch/resources/mixins.baritone.json @@ -1,7 +1,7 @@ { "required": true, "package": "baritone.launch.mixins", - "refmap": "mixins.baritone.refmap.json", + "refmap": "baritone-common-refmap.json", "compatibilityLevel": "JAVA_16", "verbose": false, "injectors": {