Modding 1.4.7: Dimension Customization: Custom save folder

This is the first of many short dimension customization tutorials. They will all cover one small subject for your dimension. They are usually really short and simple.
In this tutorial I will show you how to change the save folder for your dimension. This is done in the WorldProvider file. This is the file I will start with.


package tutorial;

import net.minecraft.world.WorldProvider;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManagerHell;
import net.minecraft.world.chunk.IChunkProvider;

public class WorldProviderTutorial extends WorldProvider
{
public void registerWorldChunkManager()
{
this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.beach, 0.8F, 0.1F);
this.dimensionId = Tutorial.dimension;
}

public String getDimensionName() 
{
return “Tutorial”;
}

public boolean canRespawnHere()
{
return true;
}

@Override
public IChunkProvider createChunkGenerator()
{
return new ChunkProviderTutorial(worldObj, worldObj.getSeed(), true);
}
}


The code you need for this is just one method that looks like this.


public String getSaveFolder()
    {
        return “Custom Dimension Tutorial Folder”;
    }


Now when you start the game it will create a folder called Custom Dimension Tutorial Folder inside of the save folder for the world you are in.
The whole file should now look like this.


package tutorial;

import net.minecraft.world.WorldProvider;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.WorldChunkManagerHell;
import net.minecraft.world.chunk.IChunkProvider;

public class WorldProviderTutorial extends WorldProvider
{
public void registerWorldChunkManager()
{
this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.beach, 0.8F, 0.1F);
this.dimensionId = Tutorial.dimension;
}

public String getDimensionName() 
{
return “Tutorial”;
}

public boolean canRespawnHere()
{
return true;
}

public String getSaveFolder()
    {
        return “Custom Dimension Tutorial Folder”;
    }

@Override
public IChunkProvider createChunkGenerator()
{
return new ChunkProviderTutorial(worldObj, worldObj.getSeed(), true);
}
}


 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">