Optimise loom configuration, saves 1.2 seconds in my testing. #319

This commit is contained in:
modmuss50
2020-12-27 16:25:30 +00:00
committed by GitHub
parent c95e3459a4
commit 792a64e2ef
16 changed files with 252 additions and 87 deletions

View File

@@ -235,10 +235,8 @@ public class LoomGradleExtension {
}
public File getNativesDirectory() {
Object customNativesDir = project.getProperties().get("fabric.loom.natives.dir");
if (customNativesDir != null) {
return new File((String) customNativesDir);
if (project.hasProperty("fabric.loom.natives.dir")) {
return new File((String) project.property("fabric.loom.natives.dir"));
}
File natives = new File(getUserCache(), "natives/" + getMinecraftProvider().getMinecraftVersion());