Package 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 Description protected int
dimensionId
protected boolean
hasNoSky
protected boolean
isHellWorld
protected float[]
lightBrightnessTable
+ Light to brightness conversion tablestatic float[]
moonPhaseFactors
protected World
worldObj
-
Constructor Summary
Constructors Constructor Description WorldProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description float[]
calcSunriseSunsetColors(float celestialAngle, float partialTicks)
+ Returns array with sunrise/sunset colorsfloat
calculateCelestialAngle(long parLong1, float parFloat1)
+ Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)boolean
canCoordinateBeSpawn(int x, int z)
+ Will check if the x, z position specified is alright to be set as the map spawn pointboolean
canRespawnHere()
+ True if the player can respawn in this dimension (true = overworld, false = nether).boolean
doesWaterVaporize()
boolean
doesXZShowFog(int x, int z)
+ Returns true if the given X,Z coordinate should show environmental fog.protected void
generateLightBrightnessTable()
+ Creates the light to brightness tableint
getAverageGroundLevel()
float
getCloudHeight()
+ the y level at which clouds are rendered.int
getDimensionId()
+ Gets the dimension of the providerabstract java.lang.String
getDimensionName()
Vec3
getFogColor(float parFloat1, float parFloat2)
+ Return Vec3D with biome specific fog colorboolean
getHasNoSky()
abstract java.lang.String
getInternalNameSuffix()
float[]
getLightBrightnessTable()
int
getMoonPhase(long parLong1)
static WorldProvider
getProviderForDimension(int dimension)
BlockPos
getSpawnCoordinate()
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.WorldBorder
getWorldBorder()
boolean
isSkyColored()
boolean
isSurfaceWorld()
+ Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.void
registerWorld(World worldIn)
+ associate an existing world with a World provider, and setup its lightbrightness tableprotected void
registerWorldChunkManager()
+ creates a new world chunk manager for WorldProvider
-
-
-
Field Detail
-
moonPhaseFactors
public static final float[] moonPhaseFactors
-
worldObj
protected World worldObj
-
isHellWorld
protected boolean isHellWorld
-
hasNoSky
protected boolean hasNoSky
-
lightBrightnessTable
protected final float[] lightBrightnessTable
+ Light to brightness conversion table
-
dimensionId
protected int dimensionId
-
-
Method Detail
-
registerWorld
public final void registerWorld(World worldIn)
+ associate an existing world with a World provider, and setup its lightbrightness table
-
generateLightBrightnessTable
protected void generateLightBrightnessTable()
+ Creates the light to brightness table
-
registerWorldChunkManager
protected void registerWorldChunkManager()
+ creates a new world chunk manager for WorldProvider
-
canCoordinateBeSpawn
public boolean canCoordinateBeSpawn(int x, int z)
+ Will check if the x, z position specified is alright to be set as the map spawn point
-
calculateCelestialAngle
public float calculateCelestialAngle(long parLong1, float parFloat1)
+ Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
-
getMoonPhase
public int getMoonPhase(long parLong1)
-
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 celestialAngle, float partialTicks)
+ Returns array with sunrise/sunset colors
-
getFogColor
public Vec3 getFogColor(float parFloat1, float parFloat2)
+ 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 dimension)
-
getCloudHeight
public float getCloudHeight()
+ the y level at which clouds are rendered.
-
isSkyColored
public boolean isSkyColored()
-
getSpawnCoordinate
public BlockPos getSpawnCoordinate()
-
getAverageGroundLevel
public int getAverageGroundLevel()
-
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 x, int z)
+ Returns true if the given X,Z coordinate should show environmental fog.
-
getDimensionName
public abstract java.lang.String getDimensionName()
-
getInternalNameSuffix
public abstract java.lang.String getInternalNameSuffix()
-
doesWaterVaporize
public boolean doesWaterVaporize()
-
getHasNoSky
public boolean getHasNoSky()
-
getLightBrightnessTable
public float[] getLightBrightnessTable()
-
getDimensionId
public int getDimensionId()
+ Gets the dimension of the provider
-
getWorldBorder
public WorldBorder getWorldBorder()
-
-