Skip to content

Commit

Permalink
Try fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
zbx1425 committed Apr 23, 2024
1 parent f3f1094 commit ab46a75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ task setupLibrary() {
}
}

String minecraftMappingsBaseURL = is_1_20 ? "https://storage.zbx1425.cn/mtr-artifacts/Minecraft-Mappings/" : "https://github.com/jonafanho/Minecraft-Mappings/archive/refs/heads/"
String minecraftMappingsBaseURL = "https://github.com/zbx1425/Minecraft-Mappings/archive/refs/heads/"

download {
src "${minecraftMappingsBaseURL}${is_1_19_3 ? minecraft_version : "1." + minecraft_main_version}.zip"
Expand Down Expand Up @@ -150,6 +150,7 @@ configure(allprojects.findAll {it.name != 'rhino'}) {
}

options.compilerArgs += ['-Xplugin:Manifold', '-AMC_VERSION=' + minecraft_version_int]
options.verbose = true
}

afterEvaluate {
Expand Down
6 changes: 4 additions & 2 deletions build_dep_ver.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ String minecraft_version
if (project.rootProject.file('build.properties').exists()) {
localProperties.load(project.rootProject.file('build.properties').newDataInputStream())
}
if (localProperties.containsKey("MC_VERSION")) {
if (rootProject.properties.containsKey("buildVersion")) {
minecraft_version = rootProject.properties.get("buildVersion")
} else if (localProperties.containsKey("MC_VERSION")) {
String notDotted = localProperties.get("MC_VERSION")
String dotted = notDotted.substring(0, 1) + "." +
Integer.toString(Integer.parseInt(notDotted.substring(1, 3))) + "." +
Integer.toString(Integer.parseInt(notDotted.substring(3, 5)))
minecraft_version = dotted
} else {
minecraft_version = rootProject.properties.containsKey("buildVersion") ? rootProject.properties.get("buildVersion") : default_minecraft_version
minecraft_version = default_minecraft_version
}
rootProject.ext.minecraft_version = minecraft_version
rootProject.ext.minecraft_main_version = minecraft_version.split("\\.")[1] as int
Expand Down

0 comments on commit ab46a75

Please sign in to comment.