Added custom save folder names to world providers
This commit is contained in:
parent
81c0a59e6d
commit
2c7556363d
2 changed files with 26 additions and 14 deletions
|
@ -24,14 +24,22 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class HyperSpaceWorldProvider extends WorldProvider {
|
||||
|
||||
private CelestialObject celestialObjectDimension = null;
|
||||
|
||||
public HyperSpaceWorldProvider() {
|
||||
worldChunkMgr = new WorldChunkManagerHell(WarpDrive.spaceBiome, 0.0F);
|
||||
hasNoSky = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDimension(final int dimensionId) {
|
||||
super.setDimension(dimensionId);
|
||||
celestialObjectDimension = StarMapRegistry.getCelestialObject(dimensionId, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDimensionName() {
|
||||
return "Hyperspace";
|
||||
return celestialObjectDimension == null ? "Hyperspace" : celestialObjectDimension.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,16 +92,15 @@ public class HyperSpaceWorldProvider extends WorldProvider {
|
|||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public String getSaveFolder() {
|
||||
return (dimensionId == 0 ? null : "WarpDriveHyperSpace" + dimensionId);
|
||||
return dimensionId == 0 ? null : (celestialObjectDimension == null ? "WarpDriveHyperSpace" + dimensionId : celestialObjectDimension.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCoordinateBeSpawn(int par1, int par2) {
|
||||
int var3 = worldObj.getTopSolidOrLiquidBlock(par1, par2);
|
||||
return var3 != 0;
|
||||
public boolean canCoordinateBeSpawn(int x, int z) {
|
||||
int y = worldObj.getTopSolidOrLiquidBlock(x, z);
|
||||
return y != 0;
|
||||
}
|
||||
|
||||
// shared for getFogColor(), getStarBrightness()
|
||||
|
|
|
@ -23,14 +23,22 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class SpaceWorldProvider extends WorldProvider {
|
||||
|
||||
private CelestialObject celestialObjectDimension = null;
|
||||
|
||||
public SpaceWorldProvider() {
|
||||
worldChunkMgr = new WorldChunkManagerHell(WarpDrive.spaceBiome, 0.0F);
|
||||
hasNoSky = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDimension(final int dimensionId) {
|
||||
super.setDimension(dimensionId);
|
||||
celestialObjectDimension = StarMapRegistry.getCelestialObject(dimensionId, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDimensionName() {
|
||||
return "Space";
|
||||
return celestialObjectDimension == null ? "Space" : celestialObjectDimension.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -83,19 +91,16 @@ public class SpaceWorldProvider extends WorldProvider {
|
|||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public String getSaveFolder() {
|
||||
return (dimensionId == 0 ? null : "WarpDriveSpace" + dimensionId);
|
||||
return dimensionId == 0 ? null : (celestialObjectDimension == null ? "WarpDriveSpace" + dimensionId : celestialObjectDimension.id);
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public boolean canCoordinateBeSpawn(int par1, int par2) {
|
||||
int var3 = worldObj.getTopSolidOrLiquidBlock(par1, par2);
|
||||
return var3 != 0;
|
||||
public boolean canCoordinateBeSpawn(int x, int z) {
|
||||
int y = worldObj.getTopSolidOrLiquidBlock(x, z);
|
||||
return y != 0;
|
||||
}
|
||||
/**/
|
||||
|
||||
// shared for getFogColor(), getStarBrightness()
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
Loading…
Reference in a new issue