Class WorldProvider

java.lang.Object
net.minecraft.src.WorldProvider
Direct Known Subclasses:
WorldProviderEnd, WorldProviderHell, WorldProviderSurface

public abstract class WorldProvider extends Object
  • Field Details

    • moonPhaseFactors

      public static final float[] moonPhaseFactors
    • worldObj

      public World worldObj
      world object being used
    • terrainType

      public WorldType terrainType
    • field_82913_c

      public String field_82913_c
    • 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 Details

    • WorldProvider

      public WorldProvider()
  • Method Details

    • registerWorld

      public final void registerWorld(World par1World)
      associate an existing world with a World provider, and setup its lightbrightness table
    • generateLightBrightnessTable

      public void generateLightBrightnessTable()
      Creates the light to brightness table
    • registerWorldChunkManager

      protected void registerWorldChunkManager()
      creates a new world chunk manager for WorldProvider
    • createChunkGenerator

      public IChunkProvider createChunkGenerator()
      Returns a new chunk provider which generates chunks for this world
    • 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)
    • 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)
      Returns array with sunrise/sunset colors
    • getFogColor

      public Vec3 getFogColor(float par1, float par2)
      Return Vec3D with biome specific fog color
    • 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()
      the y level at which clouds are rendered.
    • 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()
      returns true if this dimension is supposed to display void particles and pull in the far plane based on the user's Y offset.
    • getVoidFogYFactor

      public double getVoidFogYFactor()
      Returns a double value representing the Y value relative to the top of the map at which void fog is at its maximum. The default factor of 0.03125 relative to 256, for example, means the void fog will be at its maximum at (256*0.03125), or 8.
    • doesXZShowFog

      public boolean doesXZShowFog(int par1, int par2)
      Returns true if the given X,Z coordinate should show environmental fog.
    • getDimensionName

      public abstract String getDimensionName()
      Returns the dimension's name, e.g. "The End", "Nether", or "Overworld".
    • getWorldType

      @Environment(CLIENT) public int getWorldType()