Package net.minecraft.src
Class WorldProvider
java.lang.Object
net.minecraft.src.WorldProvider
- Direct Known Subclasses:
WorldProviderEnd,WorldProviderHell,WorldProviderSurface
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe id for the dimension (ex. -1: Nether, 0: Overworld, 1: The End)booleanA boolean that tells if a world does not have a sky.booleanStates whether the Hell world provider is used(true) or if the normal world provider is used(false)float[]Light to brightness conversion tablestatic final float[]World chunk manager being used to generate chunksworld object being used -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]calcSunriseSunsetColors(float par1, float par2) Returns array with sunrise/sunset colorsfloatcalculateCelestialAngle(long par1, float par3) Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)booleancanCoordinateBeSpawn(int par1, int par2) Will check if the x, z position specified is alright to be set as the map spawn pointbooleanTrue if the player can respawn in this dimension (true = overworld, false = nether).Returns a new chunk provider which generates chunks for this worldbooleandoesXZShowFog(int par1, int par2) Returns true if the given X,Z coordinate should show environmental fog.voidCreates the light to brightness tableintfloatthe y level at which clouds are rendered.abstract StringReturns the dimension's name, e.g.Gets the hard-coded portal location to use when entering this dimension.getFogColor(float par1, float par2) Return Vec3D with biome specific fog colorintgetMoonPhase(long par1) static WorldProvidergetProviderForDimension(int par0) doubleReturns a double value representing the Y value relative to the top of the map at which void fog is at its maximum.booleanreturns true if this dimension is supposed to display void particles and pull in the far plane based on the user's Y offset.intbooleanbooleanReturns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.final voidregisterWorld(World par1World) associate an existing world with a World provider, and setup its lightbrightness tableprotected voidcreates a new world chunk manager for WorldProvider
-
Field Details
-
moonPhaseFactors
public static final float[] moonPhaseFactors -
worldObj
world object being used -
terrainType
-
field_82913_c
-
worldChunkMgr
World chunk manager being used to generate chunks -
isHellWorld
public boolean isHellWorldStates whether the Hell world provider is used(true) or if the normal world provider is used(false) -
hasNoSky
public boolean hasNoSkyA boolean that tells if a world does not have a sky. Used in calculating weather and skylight -
lightBrightnessTable
public float[] lightBrightnessTableLight to brightness conversion table -
dimensionId
public int dimensionIdThe id for the dimension (ex. -1: Nether, 0: Overworld, 1: The End)
-
-
Constructor Details
-
WorldProvider
public WorldProvider()
-
-
Method Details
-
registerWorld
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
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
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
-
getCloudHeight
public float getCloudHeight()the y level at which clouds are rendered. -
isSkyColored
public boolean isSkyColored() -
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
Returns the dimension's name, e.g. "The End", "Nether", or "Overworld". -
getWorldType
@Environment(CLIENT) public int getWorldType()
-