net.minecraftforge.common
Class DimensionManager

java.lang.Object
  extended by net.minecraftforge.common.DimensionManager

public class DimensionManager
extends Object


Constructor Summary
DimensionManager()
           
 
Method Summary
static WorldProvider createProviderFor(int dim)
           
static Integer[] getIDs()
           
static int getNextFreeDimId()
          Return the next free dimension ID.
static WorldProvider getProvider(int dim)
           
static int getProviderType(int dim)
           
static Integer[] getStaticDimensionIDs()
          Not public API: used internally to get dimensions that should load at server startup
static WorldServer getWorld(int id)
           
static WorldServer[] getWorlds()
           
static void init()
           
static void initDimension(int dim)
           
static void loadDimensionDataMap(NBTTagCompound compoundTag)
           
static void registerDimension(int id, int providerType)
           
static boolean registerProviderType(int id, Class<? extends WorldProvider> provider, boolean keepLoaded)
           
static NBTTagCompound saveDimensionDataMap()
           
static void setWorld(int id, WorldServer world)
           
static boolean shouldLoadSpawn(int dim)
           
static void unloadWorld(int id)
           
static void unloadWorlds(Hashtable<Integer,long[]> worldTickTimes)
           
static void unregisterDimension(int id)
          For unregistering a dimension when the save is changed (disconnected from a server or loaded a new save
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimensionManager

public DimensionManager()
Method Detail

registerProviderType

public static boolean registerProviderType(int id,
                                           Class<? extends WorldProvider> provider,
                                           boolean keepLoaded)

init

public static void init()

registerDimension

public static void registerDimension(int id,
                                     int providerType)

unregisterDimension

public static void unregisterDimension(int id)
For unregistering a dimension when the save is changed (disconnected from a server or loaded a new save


getProviderType

public static int getProviderType(int dim)

getProvider

public static WorldProvider getProvider(int dim)

getIDs

public static Integer[] getIDs()

setWorld

public static void setWorld(int id,
                            WorldServer world)

initDimension

public static void initDimension(int dim)

getWorld

public static WorldServer getWorld(int id)

getWorlds

public static WorldServer[] getWorlds()

shouldLoadSpawn

public static boolean shouldLoadSpawn(int dim)

getStaticDimensionIDs

public static Integer[] getStaticDimensionIDs()
Not public API: used internally to get dimensions that should load at server startup

Returns:

createProviderFor

public static WorldProvider createProviderFor(int dim)

unloadWorld

public static void unloadWorld(int id)

unloadWorlds

public static void unloadWorlds(Hashtable<Integer,long[]> worldTickTimes)

getNextFreeDimId

public static int getNextFreeDimId()
Return the next free dimension ID. Note: you are not guaranteed a contiguous block of free ids. Always call for each individual ID you wish to get.

Returns:

saveDimensionDataMap

public static NBTTagCompound saveDimensionDataMap()

loadDimensionDataMap

public static void loadDimensionDataMap(NBTTagCompound compoundTag)