mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
Add World parameterised getSaveDir for when dimension not yet registered
This commit is contained in:
1 parent
a78386b433
commit
f44407e884
2 files changed
+7
-6
No files matched your search
@@ -1,4 +1,4 @@
|
||||
mc_version=1.7.10
|
||||
forge_version=10.13.0.1151
|
||||
ccl_version=1.1.1.99
|
||||
mod_version=1.0.3
|
||||
mod_version=1.0.4
|
||||
@@ -15,12 +15,13 @@ public class CommonUtils
|
||||
return FMLCommonHandler.instance().getSide().isClient();
|
||||
}
|
||||
|
||||
public static File getSaveLocation(int dim) {
|
||||
File basesave = DimensionManager.getCurrentSaveRootDirectory();
|
||||
if (dim != 0)
|
||||
return new File(basesave, DimensionManager.getWorld(dim).provider.getSaveFolder());
|
||||
public static File getSaveLocation(World world) {
|
||||
File base = DimensionManager.getCurrentSaveRootDirectory();
|
||||
return world.provider.dimensionId == 0 ? base : new File(base, world.provider.getSaveFolder());
|
||||
}
|
||||
|
||||
return basesave;
|
||||
public static File getSaveLocation(int dim) {
|
||||
return getSaveLocation(DimensionManager.getWorld(dim));
|
||||
}
|
||||
|
||||
public static String getWorldName(World world) {
|
||||
|
||||
Reference in new issue
Block a user