YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraftforge.common.DimensionManager Class Reference

Static Public Member Functions

static boolean registerProviderType (int id, Class<?extends WorldProvider > provider, boolean keepLoaded)
 
static int[] unregisterProviderType (int id)
 
static void init ()
 
static void registerDimension (int id, int providerType)
 
static void unregisterDimension (int id)
 
static boolean isDimensionRegistered (int dim)
 
static int getProviderType (int dim)
 
static WorldProvider getProvider (int dim)
 
static Integer[] getIDs (boolean check)
 
static Integer[] getIDs ()
 
static void setWorld (int id, WorldServer world)
 
static void initDimension (int dim)
 
static WorldServer getWorld (int id)
 
static WorldServer[] getWorlds ()
 
static boolean shouldLoadSpawn (int dim)
 
static Integer[] getStaticDimensionIDs ()
 
static WorldProvider createProviderFor (int dim)
 
static void unloadWorld (int id)
 
static void unloadWorlds (Hashtable< Integer, long[]> worldTickTimes)
 
static int getNextFreeDimId ()
 
static NBTTagCompound saveDimensionDataMap ()
 
static void loadDimensionDataMap (NBTTagCompound compoundTag)
 
static File getCurrentSaveRootDirectory ()
 

Member Function Documentation

static WorldProvider net.minecraftforge.common.DimensionManager.createProviderFor ( int  dim)
static
static File net.minecraftforge.common.DimensionManager.getCurrentSaveRootDirectory ( )
static

Return the current root directory for the world save. Accesses getSaveHandler from the overworld

Returns
the root directory of the save
static Integer [] net.minecraftforge.common.DimensionManager.getIDs ( boolean  check)
static
static Integer [] net.minecraftforge.common.DimensionManager.getIDs ( )
static
static int net.minecraftforge.common.DimensionManager.getNextFreeDimId ( )
static

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
the next free dimension ID
static WorldProvider net.minecraftforge.common.DimensionManager.getProvider ( int  dim)
static
static int net.minecraftforge.common.DimensionManager.getProviderType ( int  dim)
static
static Integer [] net.minecraftforge.common.DimensionManager.getStaticDimensionIDs ( )
static

Not public API: used internally to get dimensions that should load at server startup

static WorldServer net.minecraftforge.common.DimensionManager.getWorld ( int  id)
static
static WorldServer [] net.minecraftforge.common.DimensionManager.getWorlds ( )
static
static void net.minecraftforge.common.DimensionManager.init ( )
static
static void net.minecraftforge.common.DimensionManager.initDimension ( int  dim)
static
static boolean net.minecraftforge.common.DimensionManager.isDimensionRegistered ( int  dim)
static
static void net.minecraftforge.common.DimensionManager.loadDimensionDataMap ( NBTTagCompound  compoundTag)
static
static void net.minecraftforge.common.DimensionManager.registerDimension ( int  id,
int  providerType 
)
static
static boolean net.minecraftforge.common.DimensionManager.registerProviderType ( int  id,
Class<?extends WorldProvider provider,
boolean  keepLoaded 
)
static
static NBTTagCompound net.minecraftforge.common.DimensionManager.saveDimensionDataMap ( )
static
static void net.minecraftforge.common.DimensionManager.setWorld ( int  id,
WorldServer  world 
)
static
static boolean net.minecraftforge.common.DimensionManager.shouldLoadSpawn ( int  dim)
static
static void net.minecraftforge.common.DimensionManager.unloadWorld ( int  id)
static
static void net.minecraftforge.common.DimensionManager.unloadWorlds ( Hashtable< Integer, long[]>  worldTickTimes)
static
static void net.minecraftforge.common.DimensionManager.unregisterDimension ( int  id)
static

For unregistering a dimension when the save is changed (disconnected from a server or loaded a new save

static int [] net.minecraftforge.common.DimensionManager.unregisterProviderType ( int  id)
static

Unregisters a Provider type, and returns a array of all dimensions that are registered to this provider type. If the return size is greater then 0, it is required that the caller either change those dimensions's registered type, or replace this type before the world is attempted to load, else the loader will throw an exception.

Parameters
idThe provider type ID to unreigster
Returns
An array containing all dimension IDs still registered to this provider type.

The documentation for this class was generated from the following file: