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 intdimensionIdprotected booleanhasNoSkyprotected booleanisHellWorldprotected float[]lightBrightnessTable+ Light to brightness conversion tablestatic float[]moonPhaseFactorsprotected WorldworldObj
-
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 colorsfloatcalculateCelestialAngle(long parLong1, float parFloat1)+ Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)booleancanCoordinateBeSpawn(int x, int z)+ Will check if the x, z position specified is alright to be set as the map spawn pointbooleancanRespawnHere()+ True if the player can respawn in this dimension (true = overworld, false = nether).booleandoesWaterVaporize()booleandoesXZShowFog(int x, int z)+ Returns true if the given X,Z coordinate should show environmental fog.protected voidgenerateLightBrightnessTable()+ Creates the light to brightness tableintgetAverageGroundLevel()floatgetCloudHeight()+ the y level at which clouds are rendered.intgetDimensionId()+ Gets the dimension of the providerabstract java.lang.StringgetDimensionName()Vec3getFogColor(float parFloat1, float parFloat2)+ Return Vec3D with biome specific fog colorbooleangetHasNoSky()abstract java.lang.StringgetInternalNameSuffix()float[]getLightBrightnessTable()intgetMoonPhase(long parLong1)static WorldProvidergetProviderForDimension(int dimension)BlockPosgetSpawnCoordinate()doublegetVoidFogYFactor()+ Returns a double value representing the Y value relative to the top of the map at which void fog is at its maximum.WorldBordergetWorldBorder()booleanisSkyColored()booleanisSurfaceWorld()+ Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.voidregisterWorld(World worldIn)+ associate an existing world with a World provider, and setup its lightbrightness tableprotected voidregisterWorldChunkManager()+ 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()
-
-