Add World parameterised getSaveDir for when dimension not yet registered

This commit is contained in:
Chicken-Bones committed 2014-10-09 12:30:58 +10:00
1 parent a78386b433
commit f44407e884
2 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -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
+6 -5
View File
@@ -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) {