net.minecraft.world

## Class WorldProvider

- java.lang.Object
- - net.minecraft.world.WorldProvider

- Direct Known Subclasses:
    WorldProviderEnd, WorldProviderHell, WorldProviderSurface

      public abstract class WorldProvider
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `dimensionId`
    `java.lang.String` | `field_82913_c`
    `boolean` | `hasNoSky`
    `boolean` | `isHellWorld`
    `float[]` | `lightBrightnessTable`
    `static float[]` | `moonPhaseFactors`
    `WorldType` | `terrainType`
    `WorldChunkManager` | `worldChunkMgr`
    `World` | `worldObj`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WorldProvider()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `float[]` | `calcSunriseSunsetColors(float par1, float par2)`
    `float` | `calculateCelestialAngle(long par1, float par3)`
    `void` | `calculateInitialWeather()`
    `boolean` | `canBlockFreeze(int x, int y, int z, boolean byWater)`
    `boolean` | `canCoordinateBeSpawn(int par1, int par2)`
    `boolean` | `canDoLightning(Chunk chunk)`
    `boolean` | `canDoRainSnowIce(Chunk chunk)`
    `boolean` | `canMineBlock(EntityPlayer player, int x, int y, int z)`
    `boolean` | `canRespawnHere()`
    `boolean` | `canSnowAt(int x, int y, int z, boolean checkLight)`
    `IChunkProvider` | `createChunkGenerator()`
    `boolean` | `doesXZShowFog(int par1, int par2)`
    `Vec3` | `drawClouds(float partialTicks)`
    `protected void` | `generateLightBrightnessTable()`
    `int` | `getActualHeight()`
    `int` | `getAverageGroundLevel()`
    `BiomeGenBase` | `getBiomeGenForCoords(int x, int z)`
    `float` | `getCloudHeight()`
    `IRenderHandler` | `getCloudRenderer()`
    `java.lang.String` | `getDepartMessage()` A Message to display to the user when they transfer out of this dismension.
    `abstract java.lang.String` | `getDimensionName()`
    `ChunkCoordinates` | `getEntrancePortalLocation()`
    `Vec3` | `getFogColor(float par1, float par2)`
    `int` | `getHeight()`
    `double` | `getHorizon()`
    `int` | `getMoonPhase(long par1)`
    `double` | `getMovementFactor()` The dimensions movement factor.
    `static WorldProvider` | `getProviderForDimension(int par0)`
    `ChunkCoordinates` | `getRandomizedSpawnPoint()`
    `int` | `getRespawnDimension(EntityPlayerMP player)` Determines the dimension the player will be respawned in, typically this brings them back to the overworld.
    `java.lang.String` | `getSaveFolder()` Returns the sub-folder of the world folder that this WorldProvider saves to.
    `long` | `getSeed()`
    `Vec3` | `getSkyColor(Entity cameraEntity, float partialTicks)`
    `IRenderHandler` | `getSkyRenderer()`
    `ChunkCoordinates` | `getSpawnPoint()`
    `float` | `getStarBrightness(float par1)`
    `double` | `getVoidFogYFactor()`
    `IRenderHandler` | `getWeatherRenderer()`
    `java.lang.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()`
    `void` | `registerWorld(World par1World)`
    `protected void` | `registerWorldChunkManager()`
    `void` | `resetRainAndThunder()`
    `void` | `setAllowedSpawnTypes(boolean allowHostile, boolean allowPeaceful)`
    `void` | `setCloudRenderer(IRenderHandler renderer)`
    `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` | `setSkyRenderer(IRenderHandler skyRenderer)`
    `void` | `setSpawnPoint(int x, int y, int z)`
    `void` | `setWeatherRenderer(IRenderHandler renderer)`
    `void` | `setWorldTime(long time)`
    `boolean` | `shouldMapSpin(java.lang.String entity, double x, double y, double z)` Determine if the cusor on the map should 'spin' when rendered, like it does for the player in the nether.
    `void` | `updateWeather()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### moonPhaseFactors

          public static final float[] moonPhaseFactors

    - #### worldObj

          public World worldObj

    - #### terrainType

          public WorldType terrainType

    - #### field_82913_c

          public java.lang.String field_82913_c

    - #### worldChunkMgr

          public WorldChunkManager worldChunkMgr

    - #### isHellWorld

          public boolean isHellWorld

    - #### hasNoSky

          public boolean hasNoSky

    - #### lightBrightnessTable

          public float[] lightBrightnessTable

    - #### dimensionId

          public int dimensionId

  - ### Constructor Detail

    - #### WorldProvider

          public WorldProvider()

  - ### Method Detail

    - #### registerWorld

          public final void registerWorld(World par1World)

    - #### generateLightBrightnessTable

          protected void generateLightBrightnessTable()

    - #### registerWorldChunkManager

          protected void registerWorldChunkManager()

    - #### createChunkGenerator

          public IChunkProvider createChunkGenerator()

    - #### canCoordinateBeSpawn

          public boolean canCoordinateBeSpawn(int par1,
                                     int par2)

    - #### calculateCelestialAngle

          public float calculateCelestialAngle(long par1,
                                      float par3)

    - #### getMoonPhase

          public int getMoonPhase(long par1)

    - #### isSurfaceWorld

          public boolean isSurfaceWorld()

    - #### calcSunriseSunsetColors

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

    - #### getFogColor

          public Vec3 getFogColor(float par1,
                         float par2)

    - #### canRespawnHere

          public boolean canRespawnHere()

    - #### getProviderForDimension

          public static WorldProvider getProviderForDimension(int par0)

    - #### getCloudHeight

          public float getCloudHeight()

    - #### isSkyColored

          public boolean isSkyColored()

    - #### getEntrancePortalLocation

          public ChunkCoordinates getEntrancePortalLocation()

    - #### getAverageGroundLevel

          public int getAverageGroundLevel()

    - #### getWorldHasVoidParticles

          public boolean getWorldHasVoidParticles()

    - #### getVoidFogYFactor

          public double getVoidFogYFactor()

    - #### doesXZShowFog

          public boolean doesXZShowFog(int par1,
                              int par2)

    - #### getDimensionName

          public abstract java.lang.String getDimensionName()

    - #### 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 java.lang.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 java.lang.String getWelcomeMessage()

      A message to display to the user when they transfer to this dimension.
      Returns:
        The message to be displayed

    - #### getDepartMessage

          public java.lang.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

    - #### getSkyRenderer

          public IRenderHandler getSkyRenderer()

    - #### setSkyRenderer

          public void setSkyRenderer(IRenderHandler skyRenderer)

    - #### getCloudRenderer

          public IRenderHandler getCloudRenderer()

    - #### setCloudRenderer

          public void setCloudRenderer(IRenderHandler renderer)

    - #### getWeatherRenderer

          public IRenderHandler getWeatherRenderer()

    - #### setWeatherRenderer

          public void setWeatherRenderer(IRenderHandler renderer)

    - #### getRandomizedSpawnPoint

          public ChunkCoordinates getRandomizedSpawnPoint()

    - #### shouldMapSpin

          public boolean shouldMapSpin(java.lang.String entity,
                              double x,
                              double y,
                              double z)

      Determine if the cusor on the map should 'spin' when rendered, like it does for the player in the nether.
      Parameters:
        `entity` - The entity holding the map, playername, or frame-ENTITYID
        `x` - X Position
        `y` - Y Position
        `z` - Z Postion
      Returns:
        True to 'spin' the cursor

    - #### getRespawnDimension

          public int getRespawnDimension(EntityPlayerMP player)

      Determines the dimension the player will be respawned in, typically this brings them back to the overworld.
      Parameters:
        `player` - The player that is respawning
      Returns:
        The dimension to respawn the player in

    - #### 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()

    - #### canBlockFreeze

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

    - #### canSnowAt

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

    - #### 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)