mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Merge remote-tracking branch 'architectury/1.18' into 1.18.2
This commit is contained in:
@@ -65,7 +65,7 @@ public final class Platform {
|
||||
/**
|
||||
* Gets the root directory for the current instance of Minecraft.
|
||||
* <p>
|
||||
* The returned path is guaranteed to be <b>absolute</b>.
|
||||
* The returned path is guaranteed to be <b>absolute</b> and <b>normalized</b>.
|
||||
*/
|
||||
@ExpectPlatform
|
||||
public static Path getGameFolder() {
|
||||
@@ -75,7 +75,7 @@ public final class Platform {
|
||||
/**
|
||||
* Gets the main <code>config</code> folder for the current instance of Minecraft.
|
||||
* <p>
|
||||
* The returned path is guaranteed to be <b>absolute</b>.
|
||||
* The returned path is guaranteed to be <b>absolute</b> and <b>normalized</b>.
|
||||
*/
|
||||
@ExpectPlatform
|
||||
public static Path getConfigFolder() {
|
||||
@@ -85,7 +85,7 @@ public final class Platform {
|
||||
/**
|
||||
* Gets the <code>mods</code> folder of the current instance of Minecraft.
|
||||
* <p>
|
||||
* The returned path is guaranteed to be <b>absolute</b>.
|
||||
* The returned path is guaranteed to be <b>absolute</b> and <b>normalized</b>.
|
||||
*/
|
||||
@ExpectPlatform
|
||||
public static Path getModsFolder() {
|
||||
|
||||
@@ -41,11 +41,17 @@ public class PlatformImpl {
|
||||
private static final Map<String, Mod> mods = new ConcurrentHashMap<>();
|
||||
|
||||
public static Path getGameFolder() {
|
||||
return FabricLoader.getInstance().getGameDir().toAbsolutePath();
|
||||
return FabricLoader.getInstance()
|
||||
.getGameDir()
|
||||
.toAbsolutePath()
|
||||
.normalize();
|
||||
}
|
||||
|
||||
public static Path getConfigFolder() {
|
||||
return FabricLoader.getInstance().getConfigDir().toAbsolutePath();
|
||||
return FabricLoader.getInstance()
|
||||
.getConfigDir()
|
||||
.toAbsolutePath()
|
||||
.normalize();
|
||||
}
|
||||
|
||||
public static Path getModsFolder() {
|
||||
|
||||
Reference in New Issue
Block a user