Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class WorldProvider

    java.lang.Object
      net.minecraft.src.WorldProvider

Direct Known Subclasses:
  WorldProviderEnd, WorldProviderHell, WorldProviderSurface

    public abstract class WorldProvider

extends Object

Field Summary
`int` | `dimensionId` The id for the dimension (ex.
`boolean` | `hasNoSky` A boolean that tells if a world does not have a sky.
`boolean` | `isHellWorld` States whether the Hell world provider is used(true) or if the normal world provider is used(false)
`float[]` | `lightBrightnessTable` Light to brightness conversion table
`WorldType` | `terrainType`
`WorldChunkManager` | `worldChunkMgr` World chunk manager being used to generate chunks
`World` | `worldObj` world object being used

Constructor Summary
`WorldProvider()`

Method Summary
`float[]` | `calcSunriseSunsetColors(float par1, float par2)`
`float` | `calculateCelestialAngle(long par1, float par3)` Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
`void` | `calculateInitialWeather()`
`boolean` | `canBlockFreeze(int x, int y, int z, boolean byWater)`
`boolean` | `canCoordinateBeSpawn(int par1, int par2)` Will check if the x, z position specified is alright to be set as the map spawn point
`boolean` | `canDoLightning(Chunk chunk)`
`boolean` | `canDoRainSnowIce(Chunk chunk)`
`boolean` | `canMineBlock(EntityPlayer player, int x, int y, int z)`
`boolean` | `canRespawnHere()` True if the player can respawn in this dimension (true = overworld, false = nether).
`boolean` | `canSnowAt(int x, int y, int z)`
`boolean` | `doesXZShowFog(int par1, int par2)`
`Vec3` | `drawClouds(float partialTicks)`
`int` | `getActualHeight()`
`int` | `getAverageGroundLevel()`
`BiomeGenBase` | `getBiomeGenForCoords(int x, int z)`
`IChunkProvider` | `getChunkProvider()` Returns the chunk provider back for the world provider
`float` | `getCloudHeight()`
`String` | `getDepartMessage()` A Message to display to the user when they transfer out of this dismension.
`abstract String` | `getDimensionName()` Returns the dimension's name, e.g.
`ChunkCoordinates` | `getEntrancePortalLocation()` Gets the hard-coded portal location to use when entering this dimension.
`Vec3` | `getFogColor(float par1, float par2)`
`int` | `getHeight()`
`double` | `getHorizon()`
`int` | `getMoonPhase(long par1, float par3)`
`double` | `getMovementFactor()` The dimensions movement factor.
`static WorldProvider` | `getProviderForDimension(int par0)`
`ChunkCoordinates` | `getRandomizedSpawnPoint()`
`String` | `getSaveFolder()` Returns the sub-folder of the world folder that this WorldProvider saves to.
`long` | `getSeed()`
`Vec3` | `getSkyColor(Entity cameraEntity, float partialTicks)`
`SkyProvider` | `getSkyProvider()`
`ChunkCoordinates` | `getSpawnPoint()`
`float` | `getStarBrightness(float par1)`
`double` | `getVoidFogYFactor()`
`String` | `getWelcomeMessage()` A message to display to the user when they transfer to this dimension.
`boolean` | `getWorldHasVoidParticles()`
`long` | `getWorldTime()`
`boolean` | `isBlockHighHumidity(int x, int y, int z)`
`boolean` | `isDaytime()`
`boolean` | `isSkyColored()`
`boolean` | `isSurfaceWorld()` Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.
`void` | `registerWorld(World par1World)` associate an existing world with a World provider, and setup its lightbrightness table
`void` | `resetRainAndThunder()`
`void` | `setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)`
`void` | `setDimension(int dim)` Sets the providers current dimension ID, used in default getSaveFolder() Added to allow default providers to be registered for multiple dimensions.
`void` | `setSkyProvider(SkyProvider skyProvider)`
`void` | `setSpawnPoint(int x, int y, int z)`
`void` | `setWorldTime(long time)`
`void` | `toggleRain()`
`void` | `updateWeather()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### worldObj

    public World worldObj

  world object being used

### terrainType

    public WorldType terrainType

### worldChunkMgr

    public WorldChunkManager worldChunkMgr

  World chunk manager being used to generate chunks

### isHellWorld

    public boolean isHellWorld

  States whether the Hell world provider is used(true) or if the normal world provider is used(false)

### hasNoSky

    public boolean hasNoSky

  A boolean that tells if a world does not have a sky. Used in calculating weather and skylight

### lightBrightnessTable

    public float[] lightBrightnessTable

  Light to brightness conversion table

### dimensionId

    public int dimensionId

  The id for the dimension (ex. -1: Nether, 0: Overworld, 1: The End)

Constructor Detail

### WorldProvider

    public WorldProvider()

Method Detail

### registerWorld

    public final void registerWorld(World par1World)

  associate an existing world with a World provider, and setup its lightbrightness table

### getChunkProvider

    public IChunkProvider getChunkProvider()

  Returns the chunk provider back for the world provider

### canCoordinateBeSpawn

    public boolean canCoordinateBeSpawn(int par1,
                                        int par2)

  Will check if the x, z position specified is alright to be set as the map spawn point

### calculateCelestialAngle

    public float calculateCelestialAngle(long par1,
                                         float par3)

  Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)

### getMoonPhase

    public int getMoonPhase(long par1,
                            float par3)

### isSurfaceWorld

    public boolean isSurfaceWorld()

  Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.

### calcSunriseSunsetColors

    public float[] calcSunriseSunsetColors(float par1,
                                           float par2)

### getFogColor

    public Vec3 getFogColor(float par1,
                            float par2)

### canRespawnHere

    public boolean canRespawnHere()

  True if the player can respawn in this dimension (true = overworld, false = nether).

### getProviderForDimension

    public static WorldProvider getProviderForDimension(int par0)

### getCloudHeight

    public float getCloudHeight()

### isSkyColored

    public boolean isSkyColored()

### getEntrancePortalLocation

    public ChunkCoordinates getEntrancePortalLocation()

  Gets the hard-coded portal location to use when entering this dimension.

### getAverageGroundLevel

    public int getAverageGroundLevel()

### getWorldHasVoidParticles

    public boolean getWorldHasVoidParticles()

### getVoidFogYFactor

    public double getVoidFogYFactor()

### doesXZShowFog

    public boolean doesXZShowFog(int par1,
                                 int par2)

### getDimensionName

    public abstract String getDimensionName()

  Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".

### setDimension

    public void setDimension(int dim)

  Sets the providers current dimension ID, used in default getSaveFolder() Added to allow default providers to be registered for multiple dimensions.

  Parameters:
    `dim` - Dimension ID

### getSaveFolder

    public String getSaveFolder()

  Returns the sub-folder of the world folder that this WorldProvider saves to. EXA: DIM1, DIM-1

  Returns:
    The sub-folder name to save this world's chunks to.

### getWelcomeMessage

    public String getWelcomeMessage()

  A message to display to the user when they transfer to this dimension.

  Returns:
    The message to be displayed

### getDepartMessage

    public String getDepartMessage()

  A Message to display to the user when they transfer out of this dismension.

  Returns:
    The message to be displayed

### getMovementFactor

    public double getMovementFactor()

  The dimensions movement factor. Relative to normal overworld. It is applied to the players position when they transfer dimensions. Exa: Nether movement is 8.0

  Returns:
    The movement factor

### getSkyProvider

    public SkyProvider getSkyProvider()

### setSkyProvider

    public void setSkyProvider(SkyProvider skyProvider)

### getRandomizedSpawnPoint

    public ChunkCoordinates getRandomizedSpawnPoint()

### getBiomeGenForCoords

    public BiomeGenBase getBiomeGenForCoords(int x,
                                             int z)

### isDaytime

    public boolean isDaytime()

### getSkyColor

    public Vec3 getSkyColor(Entity cameraEntity,
                            float partialTicks)

### drawClouds

    public Vec3 drawClouds(float partialTicks)

### getStarBrightness

    public float getStarBrightness(float par1)

### setAllowedSpawnTypes

    public void setAllowedSpawnTypes(boolean allowHostile,
                                     boolean allowPeaceful)

### calculateInitialWeather

    public void calculateInitialWeather()

### updateWeather

    public void updateWeather()

### toggleRain

    public void toggleRain()

### canBlockFreeze

    public boolean canBlockFreeze(int x,
                                  int y,
                                  int z,
                                  boolean byWater)

### canSnowAt

    public boolean canSnowAt(int x,
                             int y,
                             int z)

### setWorldTime

    public void setWorldTime(long time)

### getSeed

    public long getSeed()

### getWorldTime

    public long getWorldTime()

### getSpawnPoint

    public ChunkCoordinates getSpawnPoint()

### setSpawnPoint

    public void setSpawnPoint(int x,
                              int y,
                              int z)

### canMineBlock

    public boolean canMineBlock(EntityPlayer player,
                                int x,
                                int y,
                                int z)

### isBlockHighHumidity

    public boolean isBlockHighHumidity(int x,
                                       int y,
                                       int z)

### getHeight

    public int getHeight()

### getActualHeight

    public int getActualHeight()

### getHorizon

    public double getHorizon()

### resetRainAndThunder

    public void resetRainAndThunder()

### canDoLightning

    public boolean canDoLightning(Chunk chunk)

### canDoRainSnowIce

    public boolean canDoRainSnowIce(Chunk chunk)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD