mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-16 02:34:44 +00:00
Refactored dependency scanner
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user