mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Merge branch 'dev/0.5' into forge
This commit is contained in:
@@ -247,6 +247,12 @@ public class LoomGradleExtension {
|
||||
}
|
||||
|
||||
public File getNativesDirectory() {
|
||||
Object customNativesDir = project.getProperties().get("fabric.loom.natives.dir");
|
||||
|
||||
if (customNativesDir != null) {
|
||||
return new File((String) customNativesDir);
|
||||
}
|
||||
|
||||
File natives = new File(getUserCache(), "natives/" + getMinecraftProvider().getMinecraftVersion());
|
||||
|
||||
if (!natives.exists()) {
|
||||
@@ -256,6 +262,10 @@ public class LoomGradleExtension {
|
||||
return natives;
|
||||
}
|
||||
|
||||
public boolean hasCustomNatives() {
|
||||
return project.getProperties().get("fabric.loom.natives.dir") != null;
|
||||
}
|
||||
|
||||
public File getDevLauncherConfig() {
|
||||
return new File(getProjectPersistentCache(), "launch.cfg");
|
||||
}
|
||||
|
||||
@@ -45,6 +45,14 @@ public class MinecraftNativesProvider {
|
||||
File nativesDir = extension.getNativesDirectory();
|
||||
File jarStore = extension.getNativesJarStore();
|
||||
|
||||
if (extension.hasCustomNatives()) {
|
||||
if (!nativesDir.exists()) {
|
||||
throw new RuntimeException("Could no find custom natives directory at " + nativesDir.getAbsolutePath());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (MinecraftVersionInfo.Library library : versionInfo.libraries) {
|
||||
File libJarFile = library.getFile(jarStore);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user