Refactored dependency scanner

This commit is contained in:
FalsePattern committed 2023-11-16 14:46:03 +01:00
1 parent 5317e71e44
commit 76339dbbbe
3 files changed
+127 -97

No files matched your search

@@ -26,12 +26,19 @@ import lombok.experimental.UtilityClass;
import net.minecraft.launchwrapper.Launch;
import java.io.File;
import java.nio.file.Path;
import java.nio.file.Paths;
@UtilityClass
@StableAPI(since = "0.8.2")
public final class FileUtil {
@StableAPI.Expose
public static File getMinecraftHome() {
return Launch.minecraftHome == null ? new File(".") : Launch.minecraftHome;
return getMinecraftHomePath().toFile();
}
@StableAPI.Expose(since = "1.0.0")
public static Path getMinecraftHomePath() {
return Launch.minecraftHome == null ? Paths.get("").toAbsolutePath() : Launch.minecraftHome.toPath();
}
}